I have a page with a local variable currentItem. I'm trying to use an ajax request to change that item and refresh a detail panel, but the component does not reflect the changes. AjaxLink link = new AjaxLink(selectItem) {
public void onClick(AjaxRequestTarget target) { currentItem = item;
Your problem is that you create label with constant modal, that is set
to the value of currentItem.getName. So even if you change current item
later, the item container is not recreated, thus the label still shows
old current item name.
The solution would be to create the label like this
That worked great, thanks!!I had tried the property model approach, but it didn't work because I wasn't using the EnclosingClass as the modelObject On 10/7/06,
Matej Knopp [EMAIL PROTECTED] wrote:Your problem is that you create label with constant modal, that is set
to the value of
or just doadd(new Label(currentItemName, new AbstractReadOnlyModel() {Object getObject(Component c) { return currentItem.getName(); }});-IgorOn 10/7/06,
Ryan Sonnek [EMAIL PROTECTED] wrote:
That worked great, thanks!!I had tried the property model approach, but it didn't work because I wasn't