How to Create a Managed (Backing) Bean for any JSPX page in ADF 11g

We can create a Managed Bean in Two ways in ADF 11g –

Approach 1: As shown below, While creating the JSF page, expand the “Page Implementation” section and select the radio button for “Automatically Expose UI Components in a New Managed Bean”. This will automatically create a Managed Bean and will associate with the JSF apge fields.

Approach 2: After creating the JSPX page, create a Java Bean class and register it in “adfc-config.xml” file under “Managed Beans” section. To view the “Managed Beans” section you have to go to Overview tab at bottom in “adfc-config.xml” file as shown below

After this we will be able to use the Java Bean as a Managed Bean. The above bean will be available in the Expression Builder when we define the Action property value. A sample code is below

       <af:commandLink text=”Copy Division Set” id=”cl1″
                             action=”#{AddDivisionSetBean.fetchAbstractGroupValues}”/>
 
 

 The above bean can be called on any tag in your JSF page, which have Action propety.

Advertisements
This entry was posted in ADF (Application Development Framework) and tagged , , , , , . Bookmark the permalink.

One Response to How to Create a Managed (Backing) Bean for any JSPX page in ADF 11g

  1. Ahmed says:

    the first approach has any affect at the Application ?
    and what is the different between both …..
    Thank You …..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s