This discussion is archived
5 Replies Latest reply: Jan 3, 2013 1:00 AM by jiri.machotka RSS

how to convert af:iterator to c:forEach ?

User592717-OC Newbie
Currently Being Moderated
Hi there,

How can I convert af:iterator into c:forEach. Please find below the example

<af:iterator value="#{bindings.EmployeesView1.collectionModel}" var="obj" id="i1">
<af:outputText value="#{obj.EmployeeId}" />
</af:iterator>

When I try to convert into c:forEach as mentioned below

<c:forEach items="${bindings.EmployeesView1.collectionModel}" var="item" >
${item.EmployeeId}
</c:forEach>

I am receiving following exception:

<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
javax.faces.FacesException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items"

Please let me know is there any alternate to this issue?

Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points