4 Replies Latest reply on Mar 3, 2009 11:59 AM by B Bozhanov

    c:forEach in rich:column

    B Bozhanov Newbie

      Hi,

      I'm using MyFaces implementation of JSF 1.2, together with RichFaces components, and inside a <rich:dataTable>'s <rich:column> I want to iterate over a Set, which is a property of the variable of the dataTable. Something like

      {code}<rich:dataTable var="myVar" ...>
      <rich:column>
      <c:forEach var="innerVar" values="${myVar.mySet}"
      ${innerVar}
      </c:forEach>
      </rich:column
      </rich:dataTable>{code}

      But it doesn't work. myVar seems to be empty for c:forEach. The odd thing is that if I place the following code inside the <rich:column>
      {code}<c:if test="${empty myVar">
      ${myVar.class.name}
      </c:if>{code}

      the name of the class is outputted. I also tried # isntead of $, with no success.

      I tried iterating over a list in a declared backing bean, and it worked fine. So the question would go like this - how do I make this variable accessible for jstl tags' expressions.