[Wicket-user] ChoiceRenderer problem - although probably a problem with my brain.

2006-03-01 Thread Scott Sauyet
Oh, I'm glad to be back to Wicket. I've been off on a Struts project for several months, and am so happy to be using simple Wicket again! But I'm having a problem with my brain. This should be easy to figure out, but I keep getting stuck. Maybe it's the late nights... I'm trying to add a

Re: [Wicket-user] ChoiceRenderer problem - although probably a problem with my brain.

2006-03-01 Thread Igor Vaynberg
your list consists of Items, but the model object that the choice component is bound to is a String. wicket expects the model object's type be the same as the item type in the list, thus the problem.it thinks the model is an Item so its pulling it out and getting ABC then it is trying to get an id

Re: [Wicket-user] ChoiceRenderer problem - although probably a problem with my brain.

2006-03-01 Thread Igor Vaynberg
i dont know of any examples like that.what it entails is something like thiswrappermodel extends model { private IModel delegate; setObject(Object o) { Item item=(Item)o; delegate.setObject(item.getid()); } Object getObject() { // this is the tricker one String id=delegate.getObject(); Item

Re: [Wicket-user] ChoiceRenderer problem - although probably a problem with my brain.

2006-03-01 Thread Scott Sauyet
Igor Vaynberg wrote: your list consists of Items, but the model object that the choice component is bound to is a String. wicket expects the model object's type be the same as the item type in the list, thus the problem. I told you my brain was getting fuzzy. [ ...] either change your

Re: [Wicket-user] ChoiceRenderer problem - although probably a problem with my brain.

2006-03-01 Thread Scott Sauyet
Igor Vaynberg wrote: i dont know of any examples like that. what it entails is something like this wrappermodel extends model { private IModel delegate; [ ... ] Yeah, that sounds like a lot of work, but maybe I'm missing something. or you can do the inverse, implement your own