Use a custom converter on the choice that converts your object, or
register a class-converter for all the different classes in your app
that need to be converted.
On Tue, Mar 25, 2008 at 4:50 PM, Justin Mckay <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I have a situation where I have some generated objects that do not override
> equals that I would like to use in a selectOneChoice field. The issue is
> the selected object may not be the same object from the list of objects in
> the selectItems. For instance:
>
>
>
> <tr:selectOneChoice value="#{bean.person}">
>
> <f:selectItems value="#{peopleFinder.people}"/>
>
> </tr:selectOneChoice>
>
>
>
> So here bean.Person is a generated type Person and peopleFinder.people will
> be a Map<String,Person> of the same generated type.
>
>
>
> The way we have been handeling this is we have been wrapping the objects
> with another object that has a properly implemented equals method. This
> works but requires us to write more code, I was thinking there would be an
> easier way to do this, any ideas?
>
>
>
> Thanks,
>
>
>
> Justin