This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Bean from Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Bean from Bean" Watch "Bean from Bean" New topic
Author

Bean from Bean

francisco roman
Ranch Hand

Joined: Jun 22, 2005
Posts: 31
Hi guys,
In your opinion, doesn it make sense to populate a backing bean from another backing bean? And if it does, how would you do it?

cheers
Rick Beaver
Ranch Hand

Joined: Dec 14, 2004
Posts: 464
I have done something like this using Session scoped beans (not sure about application scoped beans)

You can access an existing Session scoped bean by using Session.getAttribute(String attribute) where the argument is the EL name in faces-config.xml.

That is the method I use for accessing Session scoped backing beans from other code.


ph34r my 133t j4v4 h4><0r1ng sk177z
francisco roman
Ranch Hand

Joined: Jun 22, 2005
Posts: 31
is Session available in a generic backing bean? so it seems from
your message.
chhers
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Bean from Bean
 
Similar Threads
JSF drop down.
setAction Problem HtmlCommandButton
forwarding after response has been committed
Sending data from Server to JSP page
JSF - Passing value from a SelectOneCheckBox to a command button