You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by raybristol <ra...@gmail.com> on 2007/10/30 16:49:34 UTC

how to remove 'choose one' from dropdownlist?

how to remove 'choose one' from dropdownlist? I can use the dropdownlist
alright, populate data etc. but wicket always put a 'choose one' option on
the top, I wonder if I can get rid of it?

Many thanks!
-- 
View this message in context: http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
Sent from the Wicket - User 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: how to remove 'choose one' from dropdownlist?

Posted by Bruno Borges <br...@gmail.com>.
Try with setRequired(true) and set the model with the first option from your
choices.



-- 
Bruno Borges
blog.brunoborges.com.br
+55 1185657739

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld

On 10/30/07, raybristol <ra...@gmail.com> wrote:
>
>
> how to remove 'choose one' from dropdownlist? I can use the dropdownlist
> alright, populate data etc. but wicket always put a 'choose one' option on
> the top, I wonder if I can get rid of it?
>
> Many thanks!
> --
> View this message in context:
> http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
> Sent from the Wicket - User 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: how to remove 'choose one' from dropdownlist?

Posted by ChuckDeal <cd...@csc.com>.
If it is just a matter of not wanting to see the phrase "Choose One" but that
you are ok with a empty value, you could use the "null" property value to
change the default text.  There is also a "null.valid" property that you can
define for the case where a null value is valid (used in conjuntion with
setNullValid(true) method).  

To use those properties, make a file can {you panel/page name}.properties
and add lines to it like:
null=Some default text
null.valid=Some other text

Chuck


raybristol wrote:
> 
> Thanks everyone!
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> put an option into your model, that way it will be selected... or
>> override getdefaultchoice() and return ""
>> 
>> -igor
>> 
>> 
>> On 10/30/07, raybristol <ra...@gmail.com> wrote:
>>>
>>> how to remove 'choose one' from dropdownlist? I can use the dropdownlist
>>> alright, populate data etc. but wicket always put a 'choose one' option
>>> on
>>> the top, I wonder if I can get rid of it?
>>>
>>> Many thanks!
>>> --
>>> View this message in context:
>>> http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
>>> Sent from the Wicket - User 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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13515621
Sent from the Wicket - User 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: how to remove 'choose one' from dropdownlist?

Posted by raybristol <ra...@gmail.com>.
Thanks everyone!



igor.vaynberg wrote:
> 
> put an option into your model, that way it will be selected... or
> override getdefaultchoice() and return ""
> 
> -igor
> 
> 
> On 10/30/07, raybristol <ra...@gmail.com> wrote:
>>
>> how to remove 'choose one' from dropdownlist? I can use the dropdownlist
>> alright, populate data etc. but wicket always put a 'choose one' option
>> on
>> the top, I wonder if I can get rid of it?
>>
>> Many thanks!
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
>> Sent from the Wicket - User 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13506924
Sent from the Wicket - User 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: how to remove 'choose one' from dropdownlist?

Posted by Igor Vaynberg <ig...@gmail.com>.
put an option into your model, that way it will be selected... or
override getdefaultchoice() and return ""

-igor


On 10/30/07, raybristol <ra...@gmail.com> wrote:
>
> how to remove 'choose one' from dropdownlist? I can use the dropdownlist
> alright, populate data etc. but wicket always put a 'choose one' option on
> the top, I wonder if I can get rid of it?
>
> Many thanks!
> --
> View this message in context: http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
> Sent from the Wicket - User 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