开发者

jsf ui:repeat with multiple items in row

开发者 https://www.devze.com 2023-03-26 22:38 出处:网络
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\">

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

精彩评论

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