This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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.
I agree. Here's the link:
subject: Bean from Bean
It's not a secret anymore!