Johan Compagner wrote:
> This is wrong.
>
> This is mentioned before on the list: The model object that is the
> selected object
> should be the same kind of object that is in the choices (the list)
>
> that is just a one-one mapping.
>
> so if your list is:
> final static List OPTIONS = Arrays.asList(new String[] {"Opt1", "Opt2",
> "Opt3"});
>
> then
>
> c.getMyOptionValue()
>
> shoudl return one of those so Opt1, Opt2 or Opt3
>
> if c can only return an int then the options list should just be a
> Integer array of those possible ints.
> And the getDisplayValue should return Opt1 for integer1 and Opt2 for
> integer2 and so on.
>
> Thats the idea.. The renderer gives you an method where you can return
> the display value of a real object.
>
> johan
Thanks! I solved it. I'll add the example to the wiki for future reference.
- 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user