]
Brian Leathem updated RF-12296:
-------------------------------
Fix Version/s: 5-Tracking
(was: 4.3.0.M3)
CDK: missing type information of statically imported members
------------------------------------------------------------
Key: RF-12296
URL:
https://issues.jboss.org/browse/RF-12296
Project: RichFaces
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: cdk
Affects Versions: 4.2.2.Final
Environment: All
Reporter: Paul Dijou
Labels: cdk, review, richfaces, type
Fix For: 5-Tracking
As we can see on [this
comment|https://issues.jboss.org/browse/RF-10037?focusedCommentId=1269671...],
you currently need to assign a list/array to a var before using it inside a
{{<c:forEach>}} or the CDK doesn't know its correct type.
As suggested by Lukas, I agree to add a {{cdk:itemType}} (or {{cdk:type}} like in the
{{<cdk:object>}} tag) to specify manually the type of the object inside the
iteration. If this attribute is present in the {{<c:forEach>}}, then the CDK use it
to cast the object, otherwise it does the same as currently, no regression.
In addition, for Enum, I would also try to use the initial import :
{code:xml}
<cdk:import package="org.richfaces.component" names="MyEnum"
/>
{code}
In order to know the type of each Enum and then be able to correctly cast the following
code :
{code:xml}
<cc:implementation>
<c:forEach items="#{MyEnum.values()}" var="item">
#{item}
</c:forEach>
</cc:implementation>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: