1.

What Makes A Backing Bean Is The Relationship It Has With A Jsf Page; It Acts As A Place To Put Component References And Event Code.

Answer»

Backing Beans :

  • A backing bean is any bean that is referenced by a form.
  • Backing Beans should be defined only in the request scope.

Managed Beans :

  • A managed bean is a backing bean that has been registered with JSF (in faces-config.xml) and it automatically created (and optionally initialized) by JSF when it is needed.
  • The ADVANTAGE of managed beans is that the JSF framework will automatically create these beans, optionally initialize them with parameters you specify in faces-config.xml,
  • The managed beans that are created by JSF can be stored WITHIN the request, session, or application scopes.

Backing Beans should be defined in the request scope, exist in a one-to-one relationship with a particular page and hold all of the page specific event handling code.In a real-world SCENARIO, several PAGES may NEED to share the same backing bean behind the scenes.A backing bean not only contains view data, but also behavior related to that data.

 

Backing Beans :

Managed Beans :

Backing Beans should be defined in the request scope, exist in a one-to-one relationship with a particular page and hold all of the page specific event handling code.In a real-world scenario, several pages may need to share the same backing bean behind the scenes.A backing bean not only contains view data, but also behavior related to that data.

 



Discussion

No Comment Found