ADF PageDefinition

ADF Pagedefinition file contains all defines the binding variable needed of a JSF page. Whenever user drags a component from ‘Data Control’ palate to a JSF page, a page definition file will get created with the name <PAGENAME>PageDef.xml. By default, the file resides under the package view.pageDefs of your viewController. Suppose if a JSF page is created under a different directory then the page definition file also sits under a directory with the same name. The conclusion is, for each JSF page there is a page definition file, but the question is how the ADF knows which page def file belongs to the JSF page? It finds out by Databindings.cpx file. This DataBindings.Cpx file contains the mapping between JSF page and page definition file.

Note:  When you delete an ADF Page Definition file / JSF, Always do Right Click on the file  >> Refactor >> Delete

The below image explains about the relation between JSF file, page definition file, and Databinding.

051116_0129_ADFPageDefi1 About ADF PageDefinition File and Data Binding.cfx file

Let’s create an ADF PageDefinition File and data binding file in an ADF project.

Pre-Requisite:

JDeveloper 12C

HR Schema (Ships with Oracle Database)

EmployeeVO object (Click here for the instruction to create Entity object from Employee table)

ADF Pagedefinition Example: 

I had an ADF Fusion web application and created EmployeeEO object as shown below.

051116_0129_ADFPageDefi2 About ADF PageDefinition File and Data Binding.cfx file

 

Create a JSF file: Right click on the ViewController >> Click New >> Select Page >> Input index.jsf >> Click ok

 

051116_0129_ADFPageDefi3 About ADF PageDefinition File and Data Binding.cfx file

 

Create a Input Text Field: Expand the DataControls >> Expand AppModuleDataControl >> Expand EmployeesView >> Drag and drop a field to the JSF page >> Select Text >> Select ADF Input Text

 

051116_0129_ADFPageDefi4 About ADF PageDefinition File and Data Binding.cfx file

 

What happens here? : ADF created a page definition file (indexPageDef.xml) and data bindings file (DataBindings.cpx) if not already exist

 

051116_0129_ADFPageDefi5 About ADF PageDefinition File and Data Binding.cfx file

 

Let’s Open What Page Definition file contains: Double click on the indexPageDef.Xml file. The binding first name attribute is mapped to the EmployeeView object through an iterator as shown below.

 

051116_0129_ADFPageDefi6 About ADF PageDefinition File and Data Binding.cfx file

 

Let’s open what DataBinding.xml contains: Double click on the DataBindings.xml file >> The JSF file is mapped to the Page Definition file through an ID attribute. It also tells which Data Control is used.

 

051116_0129_ADFPageDefi7 About ADF PageDefinition File and Data Binding.cfx file

govindan About ADF PageDefinition File and Data Binding.cfx file
Connect me

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 šŸ™‚
govindan About ADF PageDefinition File and Data Binding.cfx file
Connect me
By | 2017-06-11T16:25:12+00:00 May 10th, 2016|Categories: ADF|Tags: , , , |0 Comments
Like us on Facebook.
Connect!