Create a Backing Bean for Existing Page

A backing bean is a special case of managed bean that has a one-to-one relationship to a single JSF page, and it exposes setter and getter methods for the components contained on the page. In Jdeveloper you can automatically expose UI components in a new bean when you create a new page by setting the Automatically Expose New UI Components in a New Managed Bean option as shown in the figure below.

Automatically Expose New UI Components in a New Managed Bean option

Automatically Expose New UI Components in a New Managed Bean option

But imagine you forget to set this option and later you decided to create a Backing Bean, do you need to explicitly bind each component to the backing bean?

Fortunately, you don’t need to bind the components manually, all you need is to open the page in the visual editor and  choose Design | Page Properties from the Jdeveloper menu bar as shown in the figure below:

Click on the page properties and then select the Component Binding tab from the page properties window, set the Auto Bind option, and create or select an existing managed bean.

expose3

About these ads

2 Comments

Filed under Uncategorized

2 responses to “Create a Backing Bean for Existing Page

  1. rrrr

    thanks a lot, people on other forum dont have this answer

  2. abdullah

    thanks very helpful

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