File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Bean from Bean" Watch "Bean from Bean" New topic

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?

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.
Don't get me started about those stupid light bulbs.
subject: Bean from Bean