The simplest would be not to use the ChoiceRenderer, but depend on
your object's toString instead. But that's usually too simple, so
probably not the best way. Furthermore, using a list is convenient and
works if you have no problem with having that list in memory. If
that's a dynamic list, that probably not what you want, in which case
you would be better of using the IModel argument.

Eelco


On 8/23/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote:
> Currently, via searching the mailing list, I am populating a drop down list
> like this.
>  
>  categoryChoice = new DropDownChoice("category", list, new
> ChoiceRenderer("category", "categoryId"));
>  
>  Where list is a java.util.List full of Category objects which is a POJO
> consiting of the (Integer)categoryId and the (String)category.
>  
>  This works.  My question is, since I saw multiple ways of doing this and
> this appeared to be the simplest, is it 
>  
>  a) really the simplest
>  b) the best way
>  c) none of the above
>  d) all of the above.
>  
>  Thanks for any suggestions.
>  
>  Gregg
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to