First page Back Continue Last page Text

oracle adf workshop


Managed Beans in adfc-config.xml

Managed beans can be defined in ADF Controller source files only (adfc-config.xml or bootstrap source files, and task flow definition files). They are not allowed in the faces-config.xml file. Managed beans are defined in the .xml files by using the <managed-bean> tag. Attributes of the managed bean, as shown in the example in the slide, are as follows:

<managed-bean-name>: Specifies the name that is used to refer to the managed bean throughout the application

<managed­bean-class>: Contains the fully qualified class name for the JavaBean

<managed-bean-scope>: Defines the scope of the JavaBean. The possible values for this element are application, session, request, pageFlow, view, backingBean, or none (these are described in the lesson titled “Passing Values Between UI Elements”). If the value of the managed-bean-scope element is something other than none, the JavaBean created is stored in the corresponding object. For example, if the value is request, the JavaBean is stored in the request object of a given user.

If you have created a new Java class for your bean, JDeveloper creates skeleton code to which you need to add your own code.