[jboss-user] [JBoss Seam] - DataModelSelection with two beans without using session scop

hamtho2 do-not-reply at jboss.com
Mon Feb 19 09:35:16 EST 2007


Hi,

is there a possibility to use the @DataModelSelection over two different beans without using the session-scope for injection?
Right now it works if I use the bean with the @DataModel and the @DataModelSelection with session-scope and use this value through an @In annotation in my other bean. But what I don´t like is that I set the value in session-scope then, so that a create=true with the @In-Value might not work because of old values. But everytime I change the scope of the @Out-value to anything other than session, I don´t have any value in my other bean anymore.

Some code for further details:


  | @Stateful
  | @Name("ActionBeanA")
  | @Scope(ScopeType.SESSION)
  | public class ActionBeanA implements IActionBeanA{
  |     
  |     @DataModel
  |     private List<Item> itemList;
  |     @DataModelSelection
  |     @Out(required=false, scope=ScopeType.SESSION)
  |     private Item item;
  | 
  | 


  | @Stateful
  | @Name("ActionBeanB ")
  | @Scope(ScopeType.CONVERSATION)
  | public class ActionBeanB implements IActionBeanB {
  |         
  |     @In(required=true, create=true)
  |     private Item item;
  | 
  |     

Thanks for your help

Thomas

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

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




More information about the jboss-user mailing list