I am using c:forEach inside rich:dataTable. But c:forEach doesn't substitute the values for answer.choices variable and hence nothing is rendered. Is it wrong to use c:forEach inside a rich:dataTable?
I am using c:forEach inside rich:dataTable. But c:forEach doesn't substitute the values for answer.choices variable and hence nothing is rendered. Is it wrong to use c:forEach inside a rich:dataTable?
Yes, it doesn't work - don't use JSTL tags inside UI iteration components (dataTable
, for example).
Use <ui:repeat>
or <a4j:repeat>
instead of <c:forEach>
to iterate inside a dataTable
The signature of these tags is a little different:
<a4j:repeat value="#{bean.items}" var="item">
<h:outputText value="#{item}" />
</a4j:repeat>