Gwyn Evans wrote:
> What does "c.getMyOptionValue()" return?
> 
> This...
>     public HomePage() {
>         add(new DropDownChoice(
>                 "options",
>                 new Model(getMyOptionValue()),
>                 OPTIONS)
>         {
>             protected String getDefaultChoice(final Object selected) {
>                 return ""; // remove "Choose One" prompt
>             }
>         });
>     }
> 
>     private String getMyOptionValue() { return "Opt2"; }
> }
> works as you'd expect. (The ChoiceRenderer() wasn't doing anything).
> 
> /Gwyn

getMyOptionValue() actually returns an Integer.

What I'm trying to acomplish is this:
in my Client object I have stored an Integer myOptionValue, and there 
are 3 possible options, so I want to show an edit form with a 
dropdownchoice with those 3 options and have the selected option to be 
the one that corresponds to the Integer I have stored in myOptionValue.
For Integer(1) - "Opt1", Integer(2) - "Opt2", etc.

- posto


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to