Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Bcking Bean Vs Managed Bean  RSS feed

 
Malhar Me
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody tell me the exact diffrence between backing bean and managed bean.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Backing bean is one that's referenced on a JSF View. It provides the backing object for the EL that references properties in it.

A Managed Bean is one that's constructed and initialized by the JSF framework (using the faces-config specifications). Once constructed, it's inserted into the specified scope (request, session, application or one of the new JSF2 scopes).

For almost all intents and purposes, the 2 are identical, since it takes a bit of work to invoke the bean manager directly, and conversely, a Backing Bean is almost always a Managed Bean, since the act of referencing the Backing Bean on a JSF View causes the bean manager to get involved.

Although you could manually create backing beans in a non-JSF servlet/JSP the old-fashioned way and sometimes you even find cases where that's the optimal approach.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!