What is ADF Backing Bean

Home/ADF/What is ADF Backing Bean

What is  ADF Backing Bean 

ADF Backing Bean is similar to a Java Bean. The backing Bean holds all the property and function of a JSF UI components. For each JSF page, we can have a  backing bean

BackingBaen holds all the UI component properties and functions. Let’s take a UI component inputText

  • The backingBean has the value of the inputText
  • The backingBean has an instance of the inputText so that it can be changed at runtime
  • The backingBean has validator function of the inputText, performing any custom validation
  • The backingBean has the converter function of the inputText, performing the conversion
  • Also, it performs the following function
  • The backingBean has the actionListener or action method, triggered when submitting a form
  • The backingBean has the Navigation function, for moving to another page when a button or link is clicked
  • More..

Create an ADF Backing Bean

We can create a backingBean while creating a JSF page.

In JDeveloper Go to File >> New >> New Gallery >> Web Tier >>JSF page >> Enable the Select one Choice ‘Automatically Expose UI Components in a New Managed Bean’ and enter the following property

Name: Input a name, the name will be referred to within the application using EL expression

Class: Java class name for the Backing Bean

Package: Enter a package name or Browse an existing package for java class to reside

 

051516_0736_BackingBean1 What is ADF Backing Bean

 

The ADF Backing Bean will get created under the viewController under the package you have mentioned above

 

051516_0736_BackingBean2 What is ADF Backing Bean

 

Create a Validator function in an ADF Backing Bean

Double click on a UI component (ex: InputText ) in JSF page >> Choose existing Bean in the combo box or click New to create a backingBean >> Input a name in method field

051516_0736_BackingBean3 What is ADF Backing Bean

The validator method gets created in the backingBean, using uiComponent object we could process the input text and validate it. ADF process this validation during the lifecycle.

051516_0736_BackingBean4 What is ADF Backing Bean

Creating ActiionListener in BackingBean

Click on a command button >> Expand Behaviour >> click the ActionListener >> Choose New or Click New to create a new Bean >> Input a method name

051516_0736_BackingBean5 What is ADF Backing Bean

 

A method gets created in the backingBean. The method gets called whenever the button is clicked.

051516_0736_BackingBean6 What is ADF Backing Bean

pgn What is ADF Backing Bean

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
pgn What is ADF Backing Bean
By | 2017-06-11T18:01:42+00:00 May 15th, 2016|Categories: ADF|Tags: , , , |0 Comments
Like us on Facebook.
Connect!