wood burning stoves 2.0*
The moose likes JSF and the fly likes backing bean and managed bean-difference? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "backing bean and managed bean-difference?" Watch "backing bean and managed bean-difference?" New topic
Author

backing bean and managed bean-difference?

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
what is the difference between and managed bean and backing bean?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

A managed bean is simply a JavaBean that you've specified to the JSF config file as being automatically constructed and initialized by the JSF framework.

A backing bean is a JavaBean that's bound to a JSF page, usually so it can display and/or input data.

More often than not, backing beans are managed beans, since as long as the framework's willing to set up your beans for you, you might as well let it. For one thing, the management framework will allow you to tie together complex interconnetions between beans without your having to hard-code those connections within the beans themselves. Which simplifies the beans and makes them easier to reuse and to test.


Customer surveys are for companies who didn't pay proper attention to begin with.
scot summers
Greenhorn

Joined: Apr 28, 2007
Posts: 2
one more
backing bean should be defined in scope - request and it should not hold the state


my life runs at 60fps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: backing bean and managed bean-difference?