4 Replies Latest reply on Feb 13, 2007 6:39 PM by fhh

    <si:selectItems /> and selectMany

      Hello!

      I'm trying to use <si:selectItems /> together with <h:selectMany /> and it seems to be buggy.

      
      @Name("Department")
      @Scope(CONVERSATION)
      public Class Department {
      
       private List<Employee> employees;
      
      }
      
      @Entity
      public Class Employee {
      
       @Id
       private Integer id;
       private String name;
      
      }
      



      Now I want to do something like this:

      <h:selectManyCheckbox value="#{department.employees}">
      
       <si:selectItems value="#{employee}" var="employee" label="#{employee.name}" cache="true" />
      
      </h:selectManyCheckbox>
      



      This does not work on the first try. I get a validation error - "Selected item cannot be loaded from persistence context." If I try again it works and the ArrayList is updated correctly. Is this a bug or I am doing something wrongly?

      Regards

      Felix

      P.S.: All the "employees" have been persisted before and do have a valid id.