Re: Add Any option to DropDownChoice

2010-07-08 Thread Sven Meier

Actually it works without a null in your choices.

Sven
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Add-Any-option-to-DropDownChoice-tp2281498p2281887.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Add Any option to DropDownChoice

2010-07-07 Thread Matthew Welch
I'm sure this has been answered before but I've a good bit searching the
list and can't seem to find it...

I need to add an option to a DropDownChoice that displays the word Any and
will be treated differently than the other options. I've hacked an
IChoiceRenderer to death and managed to get the option to display but
obviously when the form is submitted and Wicket tries to update the model
things fall apart. I'm clearly doing things wrong at a very basic level

This doesn't seem like isn't an unusual use case so I assume I'm probably
missing something obvious, but I could sure use some help seeing it.


Re: Add Any option to DropDownChoice

2010-07-07 Thread Igor Vaynberg
you need to have an actual value in the choices collection that
represents the any option. you can do this by prepending null to
your choices collection, letting the renderer render it as any and
calling setnullvalid(true) on the ddc.

-igor

On Wed, Jul 7, 2010 at 1:55 PM, Matthew Welch matt...@welchkin.net wrote:
 I'm sure this has been answered before but I've a good bit searching the
 list and can't seem to find it...

 I need to add an option to a DropDownChoice that displays the word Any and
 will be treated differently than the other options. I've hacked an
 IChoiceRenderer to death and managed to get the option to display but
 obviously when the form is submitted and Wicket tries to update the model
 things fall apart. I'm clearly doing things wrong at a very basic level

 This doesn't seem like isn't an unusual use case so I assume I'm probably
 missing something obvious, but I could sure use some help seeing it.


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