Why does p:panelGrid not work with ui:repeat?
Posted
by
CycDemo
on Stack Overflow
See other posts from Stack Overflow
or by CycDemo
Published on 2012-10-19T10:42:23Z
Indexed on
2012/10/19
11:02 UTC
Read the original article
Hit count: 157
If I use as below, I get no error, no output.
Why does p:panelGrid
not work with ui:repeat
?
Note : I don't want to use c:forEach
because of the I already face a lot of JSF issue.
<p:panelGrid>
<ui:repeat value="#{MyBean.dataList}" var="data">
<p:row>
<p:column>
<h:outputText value="#{data.name}"/>
</p:column>
<p:column>
<h:outputText value="#{data.description}"/>
</p:column>
</p:row>
</ui:repeat>
</p:panelGrid>
MyBean.java
public List<Data> getDataList(){
List<Data> result = new ArrayList<Data>();
result.add(new Data("Name 1", "Description 1"));
result.add(new Data("Name 2", "Description 2"));
result.add(new Data("Name 3", "Description 3"));
result.add(new Data("Name 4", "Description 4"));
return result;
}
Expected output with primefaces
© Stack Overflow or respective owner