开发者

JSF h:panelGrid with ui:repeat

开发者 https://www.devze.com 2023-04-07 10:27 出处:网络
My problem is ui:repeat inside a h:panelGrid. Its a big table from a list of objects.. All objects are saved in one list.

My problem is ui:repeat inside a h:panelGrid. Its a big table from a list of objects.. All objects are saved in one list.

I tried this:

<h:panelGrid columns="1000">
  <ui:repeat var="item" value="#{item.list}">
    开发者_如何转开发 <h:outputText value="#{item.string}" />
   </ui:repeat>
</h:panelGrid>

but inside a panelGrid the ui:repeat tag is one column for the grid. So all items are in one td tag.

Is there a possibility to get the right column count?


In that case you can use c:forEach instead of ui:repeat. c:forEach will cause a separate UIOutputText component in components tree for each item in the list.

For more information on difference between c:forEach and ui:repeat refer here

0

精彩评论

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