You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by prasopes <vl...@gmail.com> on 2013/02/15 17:21:46 UTC

DropDownChoice - single choice, preselect automatically

I know I can preselect the value of DropDownChoice by setting the
corresponding value in the model.

My use case is this: I have several DropDownChoice with
OnChangeAjaxBehaviors. Selection of value in one DDChoice enables second
DDChoice. The values in second DDChoice depend on the value selected in the
first DDChoice. In case the second DDChoice has only one possible value, I
would like to have it preselected automatically.

However, I'm unsure in which lifecycle phase I should look at the number of
options of second DDChoice and manipulate its model to achieve preselection.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-single-choice-preselect-automatically-tp4656417.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice - single choice, preselect automatically

Posted by prasopes <vl...@gmail.com>.
That works great, thank you!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-single-choice-preselect-automatically-tp4656417p4656472.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice - single choice, preselect automatically

Posted by Sven Meier <sv...@meiers.net>.
#onConfigure() would be a good place to preselect something.

Sven

On 02/15/2013 05:21 PM, prasopes wrote:
> I know I can preselect the value of DropDownChoice by setting the
> corresponding value in the model.
>
> My use case is this: I have several DropDownChoice with
> OnChangeAjaxBehaviors. Selection of value in one DDChoice enables second
> DDChoice. The values in second DDChoice depend on the value selected in the
> first DDChoice. In case the second DDChoice has only one possible value, I
> would like to have it preselected automatically.
>
> However, I'm unsure in which lifecycle phase I should look at the number of
> options of second DDChoice and manipulate its model to achieve preselection.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-single-choice-preselect-automatically-tp4656417.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org