[jboss-user] [JBoss Seam] - <si:selectItems /> and selectMany

fhh do-not-reply at jboss.com
Tue Feb 13 13:16:20 EST 2007


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.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015942#4015942

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015942



More information about the jboss-user mailing list