Hi,
I have a DropDownChoice in a WizardStep component (Wicket 1.3 beta 3) and I
want to read the selected value then update a text label based on selection
as well as disable the "Next" button if the user hasn't made a selection.
First of all I cannot get the selected value when I run the code below, the
selectedChoice variable is always null.
Secondly, how to ajaxify the "Next" wizard button based on the selection?
What am I doing wrong?
final ValueMap choiceMap = new ValueMap();
final PropertyModel ddcModel = new PropertyModel(choiceMap,
"selectedOption");
final DropDownChoice ddChoice = new DropDownChoice("choiceId", ddcModel,
someOptionList);
ddChoice.add(new AjaxEventBehavior("onchange") {
@Override
protected void onEvent(AjaxRequestTarget target) {
Object selectedChoice =
choiceMap.get("selectedOption");
}
});
Thanks!
florin
--
View this message in context:
http://www.nabble.com/Formless-DropDownChoice-selected-value-is-null-tf4502016.html#a12839591
Sent from the Wicket - User mailing list archive at Nabble.com.