The reason being <af:forEach> cannot share a binding EL value with the Children.
It means a component instance may only exist once in a component tree.
Therefore, if it is desired to have the component bound
to a managed bean, the binding must evaluate to a different bean property for every iteration of the loop.
For example:
<af:forEach var="item" items="#{bean.items}">
<!-- Note that the output text component is bound to the item, not the bean -->
<af:outputText binding="#{item.outputText}" />
</af:ForEach>
The forEach tag should be used with intent and knowledge. The forEach tag is not used in JSF for iteration, but instead for generating multiple components. If your goal is to iterate over a collection of objects and render HTML for each item, <af:iterator> should be using instead.-
More info- Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
It means a component instance may only exist once in a component tree.
Therefore, if it is desired to have the component bound
to a managed bean, the binding must evaluate to a different bean property for every iteration of the loop.
For example:
<af:forEach var="item" items="#{bean.items}">
<!-- Note that the output text component is bound to the item, not the bean -->
<af:outputText binding="#{item.outputText}" />
</af:ForEach>
The forEach tag should be used with intent and knowledge. The forEach tag is not used in JSF for iteration, but instead for generating multiple components. If your goal is to iterate over a collection of objects and render HTML for each item, <af:iterator> should be using instead.-
More info- Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
No comments:
Post a Comment