You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by goody44 <ma...@spidertracks.co.nz> on 2010/07/02 03:14:47 UTC
dropdownchoice onchange event called before propertymodel updates
Hi,
I have a dropdownchoice which determines what details that a form holds. The
problem that I am having is that the ajax event is being called before the
property model updates the field. So the addVehicleFormPanel is being
rendered with the old value and now the new selected one.
Hopefully that makes sense.
I am a bit of a newbie to wicket so dumb it down if you can.
Any help is very much appreciated. Thanks
DropDownChoice<Vehicle> vehiclesDropDown = new DropDownChoice<Vehicle>(
"vehicleSelect", new PropertyModel<Vehicle>(this,
"selectedVehicle"),
new PropertyModel<List<Vehicle>>(user, "vehicles"),
new WebOptionStringChoiceRender<Vehicle>())
vehiclesDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(addVehicleFormPanel);
}
});
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/dropdownchoice-onchange-event-called-before-propertymodel-updates-tp2275897p2275897.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: dropdownchoice onchange event called before propertymodel
updates
Posted by vov <vo...@mail.ru>.
Can you post more code from your example?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/dropdownchoice-onchange-event-called-before-propertymodel-updates-tp2275897p2276047.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org