1 Reply Latest reply on Jul 8, 2008 11:25 PM by dan.j.allen

    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>




      My business-bean:



      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?



        • 1. Re: SEAM+RichFaces+s:convertEntity
          dan.j.allen

          Um, you cannot bind to a function: #{myRolesInGroup(groups, roles)}. This makes no sense. You need to have a collection property to which the selections are bound. You can use those selections to lookup other information in the action method. So you are looking for something like #{componentName.selectedRoles}.