Sweet! No ever asked to elaborate my idiocy;)  Just kidding

What I had done (with simple but not the same example) was I created a bean 
just to try things out


  | @Stateful
  | @Name("searchEmployeesByState")
  | @Scope(ScopeType.SESSION)
  | public void SearchEmployeesByState ... {
  |       
  |       private List<Employee> employees;
  | 
  |       /**
  |         * Getters and setters, em finders, etc here
  |         */
  | }
  | 

I then produced a page to view just to try things out


  |      <h:dataTable value="#{searchEmployeesByState.employees}" 
var="employee">
  |           ....
  |       </h:dataTable>
  | 

Note, the value in my data table....Because that's where my problem occured.

I then decided that I wanted to select the model....so like a good citizen I 
changed my bean...


  | @Stateful
  | @Name("searchEmployeesByState")
  | @Scope(ScopeType.SESSION)
  | public void SearchEmployeesByState ... {
  |       
  |       @DataModel
  |       private List<Employee> employees;
  | 
  |       @DataModelSelection
  |       private Employee employee;
  | 
  |       /**
  |         * Getters and setters, em finders, etc here
  |         */
  | }
  | 

Now that I did that, I didn't change my web page like I should've.  That's when 
an angry mind and a keyboard can go a long way to ruin your day.  I was trying 
different combos with factory, etc, and I couldn't figure out why my one item 
wasn't being selected.  Finally, after a while and came back and realized I had 
to make my web page into the following.  Basic seam stuff, but I just missed 
it. :(



  |      <h:dataTable value="#{employees}" var="employee">
  |           ....
  |       </h:dataTable>
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095429
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to