On Fri, May 09, 2008 at 09:15:50AM -0700, Michael Mehrle wrote:
> Great input and you're forgiven for jumping the gun with SelectOption
> ;-)
> 
> I didn't even know there was a wicket SelectOption, which puts a new
> spin on things. Regarding the conversion back to the model: Yes, I was
> following the example hoping IT WOULD BE CORRECT.
> 
> I concur with you that it's probably trying to cast SelectOption into an
> Integer, but that doesn't explain why it actually works when I refrain
> from tagging a non-integer string to the label (e.g. '1' as the label
> vs. '1 guest'). How does it manage to convert properly then?
> 
> Michael

Well, it's probably noticing that it's a string and trying
Integer.parseInt(), but it's really beside the point. Unless you follow
the "golden rule" your code will most certainly break in 1.4, where the
DDC constructor looks something like this:

public DropDownChoice(String id, Model<T> model, List<T> choices,
ChoiceRenderer<T> choiceRenderer);

jk

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

Reply via email to