[ http://issues.apache.org/jira/browse/ADFFACES-74?page=all ]
Matthias Weßendorf updated ADFFACES-74:
---------------------------------------
Status: Open (was: Patch Available)
> 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
> Assigned To: Matthias Weßendorf
> Priority: Trivial
> Attachments: fix_cce_in_selectItemSupport.patch
>
>
> 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