Reputation: 2188
I'm using a to print in two strings in two columns as in the following code:
<h:panelGrid
columns="2" border="1">
<ui:repeat
value="#{bean.selectedLocales}"
var="locale">
<h:outputText value="#{msg[locale]}"/>
</ui:repeat>
</h:panelGrid>
The above prints two locales en and de taken from a list in a same column although I use ui:repeat
and columns="2"
in <h:panelGrid>
. How can I make it to print in two different columns?
Upvotes: 1
Views: 761
Reputation: 4369
The reason is that your h:panelGrid
contains only one nested element: ui:repeat
, and it cannot show the one element in two columns.
What about doing a dynamic dataTable of it using the vendor specific columns
eg. p:columns
, ice:columns
in the JSF page and javax.faces.model.ListDataModel
in the managed bean?
Upvotes: 1