[
https://issues.apache.org/jira/browse/ADFFACES-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias Weßendorf updated ADFFACES-74:
---------------------------------------
Fix Version/s: 1.0.0-incubating-core
Affects Version/s: 1.0.0-incubating-core
> CLASSCASTEXCEPTION WHEN USING NON-STRING LABEL VALUE IN AF:SELECTITEM
> ---------------------------------------------------------------------
>
> Key: ADFFACES-74
> URL: https://issues.apache.org/jira/browse/ADFFACES-74
> Project: MyFaces ADF-Faces
> Issue Type: Improvement
> Affects Versions: 1.0.0-incubating-core
> Reporter: Arjuna Wijeyekoon
> Assigned To: Matthias Weßendorf
> Priority: Trivial
> Fix For: 1.0.0-incubating-core
>
> 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.
-
You can reply to this email to add a comment to the issue online.