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 DropDownChoiceString choiceView = new
DropDownChoiceString(choice, new PropertyModelString(model, choice),
new ArrayListString(CHOICES.keySet()));
final DropDownChoiceInteger subChoiceView = new
DropDownChoiceInteger(subChoice, new PropertyModelInteger(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);
}
});
LinkVoid ok = new AjaxFallbackLinkVoid(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