myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Putting Objects in SelectItems
Date Mon, 12 Sep 2005 16:58:00 GMT
You can, but you have to create a converter since html only represents
things as Strings.

On 9/12/05, gvial@c3tools.com <gvial@c3tools.com> wrote:
> Hi,
> 
>         I want to put Objects (DTOs) in my SelectItems, to be able to
> submit it in the Save, but i always get the Error Value is no String
> error from the renderer.
> 
> java.lang.IllegalArgumentException: Value is no String and component
> userForm:groupListBox does not have a Converter
>         at
> org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende
> rerUtils.java:670)
>         at
> org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende
> rerUtils.java:688)
>         at
> org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderSelectOptions(
> HtmlRendererUtils.java:459)
> <SNIP LONG TRACE>
> 
> javax.faces.FacesException: Value is no String and component
> userForm:groupListBox does not have a Converter
> 
> 
> Does anybody have any idea what could be wrong here? I thought I could
> put any type of object in my SelectItem...
> 
> Thanks,
> 
> Greg
>

Mime
View raw message