initialize the drop down choice' model to the default value when you first render the page.

-Igor


On 4/4/06, Stefan Lindner < [EMAIL PROTECTED]> wrote:
I'm glad that I don't see "Choose One" anymore. But how can I really set
the default value for a DropDownChoice? It doesn't matter which value I
return in the "getDefaultChoice" method. It's always the first item of
the DropDownChoice that is displayed.
The only way I found to set a default value was to call

        setModel(new CompoundPropertyModel(new Integer(3)));

for list Items "One", "Two", "Three", ... to select item 3. But that's
no way for creation a reusable component to locally set a model. Am I
wrong? Is this the corect way to specify a default value?


Stefan Lindner
------------------------------------------------------------------------
--
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: (09131)691-230, FAX: (09131)691-111
E-Mail: mailto:[EMAIL PROTECTED], Internet:
http://www.visionet.de


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to