You should use ajaxformcomponentupdatingbehavior instead of
AjaxEventBehavior . I think AjaxEventBehavior just triggers the server
side call and does not update model

-swaroop


On 9/23/07, bebetu <[EMAIL PROTECTED]> wrote:
>
>
> 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
>
>
>

Reply via email to