Currently I am playing with the new @EventListener feature and I like it very much. That's how Ajax should be.

I have a question: in the form there are two @PropertySelection components. The second one is supposed the change it's selected value dependant on the first one. Both PropertySelections are connected to a page property.

This is my listener:

@EventListener(events = "onchange", elements = "countrySelection")
public void countryChanged(IRequestCycle cycle) {
    cycle.getResponseBuilder().updateComponent("regionSelection");
}


Submitting the form (asyn or not) like I saw in the TimeTracker demo application is not an option because there are more form fields the user is supposed to fill out. So this one will not work for me:


@EventListener(events = "onchange",
    elements = "countrySelection"  submitForm = "myForm")
public void countryChanged(IRequestCycle cycle) {
    cycle.getResponseBuilder().updateComponent("regionSelection");
}


So: how can I access the value of the [EMAIL PROTECTED]'s value that triggerd the listener method? I think that the page property is not yet updated by my async request because the form was not submitted.

Thanks,
Andy





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to