aspose file tools
The moose likes JSF and the fly likes Bcking Bean Vs Managed Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Bcking Bean Vs Managed Bean" Watch "Bcking Bean Vs Managed Bean" New topic
Author

Bcking Bean Vs Managed Bean

Malhar Me
Greenhorn

Joined: Jun 22, 2009
Posts: 27
Hi,

Can anybody tell me the exact diffrence between backing bean and managed bean.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14460
    
    7

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Bcking Bean Vs Managed Bean
 
Similar Threads
Problem in Icefaces Input binding attribute
Error
Accessing jsf bean from another jsf bean
Entitybean
Coffe Cream on EB: mistakes/doubts #1