I'm trying to manually build an HTML form in JSF, using ui:repeat. Now I have some trouble with the "rendered" attribute. My code is as following:
<ui:repeat varStatus="status" value="#{bean.keys}" var="key">
<tr jsf:rendered="#{status.index%4==0}">
<td id="#{key}">
contents
</td>
</tr> <!--or even </tr jsf:rendered="#{status.index%4==0}">-->
</ui:repeat>
I try to render the <tr> tag conditionally, but I want to render the child element <td> unconditionally, every iteration. I know it is not standard behaviour of JSF, because it will not display children of an unrendered element by default, but is there another way to implement this requirement?
I've also tried:
<tr>
<ui:repeat varStatus="status" value="#{bean.keys}" var="key">
<td id="#{key}">
contents
</td>
<h:panelgroup rendered="#{status.index%4==0}"></tr><tr></h:panelgroup>
</ui:repeat>
</tr>
But this last fragment will not parse, because the closing is unexpected (it expects a closing tag for h:panelgroup)