You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Arjuna Wijeyekoon (JIRA)" <ad...@incubator.apache.org> on 2006/07/19 23:33:14 UTC

[jira] Commented: (ADFFACES-74) CLASSCASTEXCEPTION WHEN USING NON-STRING LABEL VALUE IN AF:SELECTITEM

    [ http://issues.apache.org/jira/browse/ADFFACES-74?page=comments#action_12422292 ] 
            
Arjuna Wijeyekoon commented on ADFFACES-74:
-------------------------------------------

I have a patch, will upload shortly

> CLASSCASTEXCEPTION WHEN USING NON-STRING LABEL VALUE IN AF:SELECTITEM
> ---------------------------------------------------------------------
>
>                 Key: ADFFACES-74
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-74
>             Project: MyFaces ADF-Faces
>          Issue Type: Improvement
>            Reporter: Arjuna Wijeyekoon
>            Priority: Trivial
>
> I have the following:
> <af:selectOneChoice value="#{searchEmployees.criteria.EmployeesJobId}"
> >
>   
> <af:forEach var="row2"  items="#{bindings.JobsViewLookup.rangeSet}" >
>   <af:selectItem label="#{row2.JobId}" value="#{row2.JobId}"/>
> </af:forEach>
> </af:selectOneChoice>   
> however, #{row2.JobId} (on the label attribute) evaluates to a java.lang.Number and this throws a ClassCastException, since the attribute expects a String.
> trivial fix is to use 
> String foo = label.toString() 
> instead of
> String foo =  (String) label
> I have a fix already.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira