View RSS Feed

JSF

JSF Managed Bean

Rate this Entry
by
JSF
, 01-02-2012 at 06:51 PM (1231 Views)
JSF managed beans are defined in configuration file and these are java beans to hold data from JSF components. They represent data model and are passed between JSF business logic and JSF pages.

Following are the main features of managed beans.
They use declarative model
They provide an entry point
Beans with various states

Following code shows a managed bean which has a session scope. Instance of this managed bean is created at the start of a user session.

XML Code: Managed Bean Tags
<managed-bean>
<managed-bean-name>myBean</managed-bean-name>
<managed-bean-class>myPackage.MyBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>

Submit "JSF Managed Bean" to Facebook Submit "JSF Managed Bean" to Digg Submit "JSF Managed Bean" to del.icio.us Submit "JSF Managed Bean" to StumbleUpon Submit "JSF Managed Bean" to Google

Updated 01-14-2012 at 06:30 PM by JSF

Categories
Managed Bean

Comments