I'm not using a form, it's a simple dropdownChoice in a wizard step.

swaroop belur wrote:
> 
> 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
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Formless-DropDownChoice-selected-value-is-null-tf4502016.html#a12848011
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to