2 Replies Latest reply on Feb 11, 2008 10:04 AM by c_inconnu

    selection in scrollableDataTable

    c_inconnu

      Hi,

      I am trying to select a row in a scrollableDataTable but i cannot get it to work. I cannot find what i am doing wrong :

       <h:form id="adminTabsForm" styleClass="autoScroll">
       <r:tabPanel switchType="ajax">
       <r:tab>
       <f:facet name="label">
       <h:panelGrid columns="2">
       <h:graphicImage value="/img/users/user_16.png" />
       <h:outputText value="#{messages['imp.admin.users.tab']}" />
       </h:panelGrid>
       </f:facet>
      
       <r:scrollableDataTable rowKeyVar="rkv" id="userList"
       rows="0" value="#{userManager.allUsers}" var="user"
       sortMode="single" selection="#{userManager.selection}" width="100%" height="600px">
      
       <r:column id="userName" style="width:100%">
       <h:outputText value="#{user.name}" />
       </r:column>
       </r:scrollableDataTable>
       </r:tab>
      ...
      


      and

      @Name("userManager")
      @Scope(ScopeType.CONVERSATION)
      @Stateful
      public class UserManagerImpl
       implements UserManager
      {
      
       private SimpleSelection selection = new SimpleSelection();
      
       ...
      
       public List<User> getAllUsers()
       {
       return userService.list();
       }
      
       public SimpleSelection getSelection()
       {
       return this.selection;
       }
      
       public void setSelection(SimpleSelection selection)
       {
       logger.debug("---" + selection);
       this.selection = selection;
       }
      }
      


      getSelection() and setSelection() are never called...

      Thanks

      David