You normally use an iterating component such as <ui:repeat>
or <h:dataTable>
to iterate over a collection. You can perfectly nest it inside another iterating component.
E.g.
<p:column headerText="groupe">
<ui:repeat value="#{user.groupsCollection}" var="groups">
<h:outputText value="#{groups.groupname}" /><br/>
</ui:repeat>
</p:column>
Unrelated to the concrete problem, you've there some poor naming convention. One group should be represented by a class named Group
, not Groups
. I suggest to rename the one and other so that the code becomes so much more self documenting:
<p:column headerText="groups">
<ui:repeat value="#{user.groups}" var="group">
<h:outputText value="#{group.name}" /><br/>
</ui:repeat>
</p:column>
The plural s
in the field/variable name should already be indicative that it concerns a collection.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…