You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tech7 <te...@gmail.com> on 2011/03/13 10:18:48 UTC

DropDownChoices Removing "Choose One" after Ajax Call

I have a dropdownchoice component on my page and according to some selections
on my page, this component is updated by a ajax call.
At the beginning it displays the choices without showing "Choose One" but
after ajax call it displays "Choose One". I know this issue is coming from
any of the choices are not selected right there but I don't know how to say
the component choose first one as selected for not displaying "Choose One".
Can you suggest any solution for this?
With my best regards.

-----
Developer
Wicket
Java
JSP
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351515.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: DropDownChoices Removing "Choose One" after Ajax Call

Posted by tech7 <te...@gmail.com>.
Maarten thank you for your suggestion. It was solved 

-----
Developer
Wicket
Java
JSP
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3354339.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: DropDownChoices Removing "Choose One" after Ajax Call

Posted by Maarten Billemont <lh...@gmail.com>.
On 13 Mar 2011, at 10:18, tech7 wrote:
> 
> I have a dropdownchoice component on my page and according to some selections
> on my page, this component is updated by a ajax call.
> At the beginning it displays the choices without showing "Choose One" but
> after ajax call it displays "Choose One". I know this issue is coming from
> any of the choices are not selected right there but I don't know how to say
> the component choose first one as selected for not displaying "Choose One".

The component will select the item that your model provides.  If your model's object is not set, the component will not select anything.  It would be crazy to think that the component should have an element selected that wasn't actually the model's object.

So, if you want to select the first element, set your model's object to it.


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


Re: DropDownChoices Removing "Choose One" after Ajax Call

Posted by tech7 <te...@gmail.com>.
xFlasH thank you for your suggestion but it removed Choose One but added a
blank choice to the list.

-----
Developer
Wicket
Java
JSP
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351668.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: DropDownChoices Removing "Choose One" after Ajax Call

Posted by xFlasH <rc...@gmail.com>.
Hi,

How about setNullValid(true) on the DropDownChoice ?


R


2011/3/13 tech7 [via Apache Wicket] <
ml-node+3351515-1470294512-216345@n4.nabble.com>

> I have a dropdownchoice component on my page and according to some
> selections on my page, this component is updated by a ajax call.
> At the beginning it displays the choices without showing "Choose One" but
> after ajax call it displays "Choose One". I know this issue is coming from
> any of the choices are not selected right there but I don't know how to say
> the component choose first one as selected for not displaying "Choose One".
> Can you suggest any solution for this?
> With my best regards.
> Developer
> Wicket
> Java
> JSP
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351515.html
>  To start a new topic under Users forum, email
> ml-node+1842947-98389252-216345@n4.nabble.com
> To unsubscribe from Users forum, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842947&code=cmNvcXVldWduaW90QGdtYWlsLmNvbXwxODQyOTQ3fDE1MTA1ODc1MTA=>.
>
>


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351597.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