开发者

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">
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜