[jboss-user] [JBoss Seam] - Re: getting ManagedBean out of Conversation

damianharvey do-not-reply at jboss.com
Mon Nov 5 08:19:32 EST 2007


Are you trying to access a different Bean than what you have called the method on? ie. your s:button called BeanA and you want to access properties of BeanB.

If so, then assuming BeanB has been outjected into the Conversation scope, you just need to inject BeanB into your BeanA. eg in BeanA.java :@In
  | BeanB beanB;
or if you'd rather call it inline:if(getConversation()!= null)
  | {	//Aqui me cargo la conversacion si es que existe
  | 	System.out.println("conversation ID  " .concat(getConversation().getId()));
  | 	//access to managed bean in Conversation
  | 	BeanB beanB = (BeanB)Component.getInstance("beanB");
  | }
  |    
Cheers,

Damian.

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

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



More information about the jboss-user mailing list