Hello, I have a problem with Ajax DropDownChoices and null values. I tried to make this pseudo-code, as simple as possible :
<select id="choice" wicket:id="choice" /> <select id="subChoice" wicket:id="subChoice" /> OK final DropDownChoice<String> choiceView = new DropDownChoice<String>("choice", new PropertyModel<String>(model, "choice"), new ArrayList<String>(CHOICES.keySet())); final DropDownChoice<Integer> subChoiceView = new DropDownChoice<Integer>("subChoice", new PropertyModel<Integer>(model, "subChoice"), CHOICES.get(choice)); subChoiceView.setOutputMarkupId(true); choiceView.add(new AjaxFormComponentUpdatingBehavior("onchange") { protected void onUpdate(AjaxRequestTarget target) { subChoiceView.setChoices(CHOICES.get(choice)); target.addComponent(subChoiceView); } }); Link<Void> ok = new AjaxFallbackLink<Void>("ok") { public void onClick(AjaxRequestTarget target) { System.out.println("choice: " + model.choice); System.out.println("subChoice: " + model.subChoice); } }; When I select values in the drop down choices and click OK, the choice value is the right one, and the subChoice value is always 'null'. I really don't know if it is a bug or my mistake. Thanks for your advices. -- View this message in context: http://www.nabble.com/Ajax-DropDownChoice-and-null-values-tp16473687p25235882.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org