Re: [Wicket-user] set static values on DropDownChoice

2006-07-19 Thread Eelco Hillenius
That wouldn't work then. I would typically use some wrapper object in that case. public class Foo { private String bar; public String toString() { return bar; } } The feed the dropdown with a list of Foo Eelco On 7/19/06, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: > * Eelco Hil

Re: [Wicket-user] set static values on DropDownChoice

2006-07-19 Thread Jean-Baptiste Quenot
* Eelco Hillenius: > A poor-man's method is to override toString. Do you have an example at hand please? My usecase is that the choice value is a String (not the index in the list), and the choice label is another String. -- Jean-Baptiste Quenot aka John Banana Qwerty http://cara

Re: [Wicket-user] set static values on DropDownChoice

2006-07-19 Thread Eelco Hillenius
A poor-man's method is to override toString. Eelco On 7/19/06, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: > * Vincent Jenks: > > > [...] how can I set, say, a Map of name/value pairs of Strings? > > > > In this case I'm not providing a List of values to the > > dropdown but rather a

Re: [Wicket-user] set static values on DropDownChoice

2006-07-19 Thread Jean-Baptiste Quenot
* Vincent Jenks: > [...] how can I set, say, a Map of name/value pairs of Strings? > > In this case I'm not providing a List of values to the > dropdown but rather a Map of static values - > unless of course there's an easier way. > > This control still feels cumbersome to work wort

[Wicket-user] set static values on DropDownChoice

2006-07-18 Thread Vincent Jenks
This seems like a lame question but I'm struggling again w/ the DropDownChoice control (using 1.2). I simply want to set static values to a DropDownChoice control so they can be drawn out later in the form's input class when it's submitted. I thought I had done this before but can't find that I h