java - how to get 1 attribut from groupcollection? -
hi have sample example users , groups join manytomany . dont know how attribute of collectiongroup in users code :
<p:datatable var="user" value="#{usergestion.tableusers}" editable="true" > <p:column headertext="username" filtermatchmode="contains" filterby="#{user.username}"> <p:commandlink value="#{user.username}" action="#{usergestion.insertaaa()}"/> </p:column> <p:column headertext="nom" filtermatchmode="contains" filterby="#{user.nom}"> <h:outputtext value="#{user.nom}" /> </p:column> <p:column headertext="groupe"> <h:outputtext value="#{user.groupscollection.get(0).groupname}" /> </p:column> </p:datatable>
my user.groupscollection.get(0).groupname
isnt working how can show group of user ?
solution :
user.groupscollection.toarray()[0].groupname
Comments
Post a Comment