jsf ui:repeat with multiple items in row
Is it possible to iterate over collection and display multiple items in a row? Something like:
<ui:repeat value="#{c.images}" var="img" step="3">
#{img} #{img+1} #{img+2}<br/><br/>
</ui:repeat开发者_StackOverflow中文版>
Why don't you iterate over the list and add the <br/><br/>
for every index where index % 3 == 0
?
Alternatively, if you are using RichFaces, you could try and use its datagrid:
<rich:dataGrid
value="#{c.images}"
columns="3">
...
精彩评论