Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean from Bean

 
francisco roman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
francisco roman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is Session available in a generic backing bean? so it seems from
your message.
chhers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic