Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF (richfaces) component + JSTL forEach

843844Mar 2 2009 — edited Jun 28 2010
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
<rich:dataTable var="myvar">
<rich:column>
   <c:forEach var="innerVar" values="${myVar.mySet}"
       ${innerVar}
   </c:forEach>
</rich:column
</rich:dataTable>
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>
<c:if test="${empty myVar">
        ${myVar.class.name}
</c:if>
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.

Edited by: Glammy on Mar 2, 2009 9:36 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2010
Added on Mar 2 2009
7 comments
782 views