I have a selectManyCheckbox embeeded in an rich:dataGrid:
<rich:dataGrid value="#{groupsList}" var="groups" columns="4" elements="4"> <rich:panel> <f:facet name="header"> <!--select implicitly the group by selecting the roles within the group --> <h:outputText value="#{groups.description}"/> <!-- convertEntity-Tag not compatible to outputText --> <s:convertEntity/> </f:facet> <h:selectManyCheckbox value="#{myRolesInGroup(groups, roles)}"> <s:selectItems value="#{rolesList}" var="roles" label="#{roles.description}"/> <s:convertEntity/> </h:selectManyCheckbox> </rich:panel> <f:facet name="footer"> <rich:datascroller></rich:datascroller> </f:facet> </rich:dataGrid>
@Factory("rolesList") public List <Roles> getRolesList() { return entityManager.createQuery("from Roles r").getResultList(); } @Factory("groupsList") ...
private Map<Group, Roles> myRolesInMailroom //with getter/setter ..
the dataGrid has the attributs
- binding
- componentState
- rowKey
In which of them I can put a value to retrieve ?