On Fri, May 09, 2008 at 08:25:05AM -0700, Michael Mehrle wrote:
> Anyone? Was hoping for some input here ;-)
> 
> http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
> ml
> 
> The only change I made to SelectOption is to set the 'value' field to an
> Integer (which I need for my model).
> 

That example is terrible. SelectOption is a Wicket component and an
internal implementation detail of DropDownChoice. It should not be in
your business model as the example shows.

If you're setting an integer property via a DropDownChoice, you should
pass a List<Integer> and implement ChoiceRenderer.getDisplayValue() to
output the right string to display.

My wild-ass guess would be that Wicket is trying to cast a SelectOption
into an Integer, with predictable results.

jk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to