1 Reply Latest reply on Jul 8, 2008 2:15 AM by nimo22

    SEAM+RichFaces+s:convertEntity

    nimo22

      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>


      The groupsList and the rolesList are obtained via the Factory-Methods:

      @Factory("rolesList")
      public List <Roles> getRolesList() {
      return entityManager.createQuery("from Roles r").getResultList();
       }
      
      @Factory("groupsList")
      ...


      The 'myRolesInGroup(group, roles)' is a Map:

      private Map<Group, Roles> myRolesInMailroom
      
      //with getter/setter
      ..


      But this works not as I cannot declare a convertEntity-Tag to my h:outputText-Tag.

      How can I associate the choosen roles to the group in a simply way?