Argh, fecking forum. Sorry.

anonymous wrote : 
  |   | ...
  |   |     @DataModel
  |   |     private List<Category> categories;
  |   | 
  |   |     @DataModelSelection
  |   |     private Category selectedCategory;
  |   | 
  |   | ...
  |   | 
  |   |     @Create
  |   |     public String init()
  |   |     {
  |   |         if (currentCategory == null)
  |   |         {
  |   |         currentCategory = (Category) 
em.createNamedQuery("Category.findRoot").getSingleResult();
  |   |         }
  |   |         return "success";
  |   |     }
  |   | 
  |   | ...
  |   | 
  |   |     public void select()
  |   |     {
  |   |         currentCategory = selectedCategory;
  |   |         return;
  |   |     }
  |   | 
  |   | ...
  |   | 

Assuming you have @Out(scope=SESSION) CurrentCategory currentCategory and you 
call #{categoryManager.select} method when you change the category that would 
be a good approach, yes.

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

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

Reply via email to