0 Replies Latest reply on Feb 27, 2008 10:30 AM by poiu77

    rich:scrollableDataTable selection problem

    poiu77

      Hi,

      When I open a page with the rich:scrollableDataTable I get a following exception:


      Cannot convert org.richfaces.model.selection.SimpleSelection@1f of type class org.richfaces.model.selection.SimpleSelection to interface org.richfaces.model.selection.Selection


      The rich:scrollableDataTable looks like this:

      <rich:scrollableDataTable reRender="field" rowKeyVar="row" height="200px"
      
       width="200px" id="userListId" rows="5"
      
       value="#{trip.members}" var="member" sortMode="single"
      
       selection="#{manager.selectedMember}" >
      
       <rich:column>
       <h:outputText value="#{member.first} #{member.last}" />
       </rich:column>
      
       </rich:scrollableDataTable>
      


      The manager bean:

      
      @Stateful
      @Name("manager")
      public class ManagerBean implements ManagerLocal {
      
      
       @PersistenceContext(unitName = "ds")
       private EntityManager em;
       @In(required = true)
       private Trip trip;
       private SimpleSelection selectedMember = new SimpleSelection();
      
      
      
       public SimpleSelection getSelectedMember {
      
       return selectedMember;
       }
      
       public void setSelectedMember(SimpleSelection selectedMember) {
      
      
       this.selectedMember = selectedMember;
       }
      
       @Destroy
       @Remove
       public void end() {
      
       }
      
      
      }
      
      
      


      I look forward to any help. Thank you in advance.