Quantcast
Channel: Ashish Awasthi's Blog
Viewing all articles
Browse latest Browse all 165

OTN Appreciation Day: Oracle ADF Bindings #ThanksOTN

$
0
0
Hello Everyone

I am late still I thought to write about Oracle ADF Bindings for OTN Appreciation Day

ADF binding layer works as glue between Model and View layer, Values from model propagates to page through Binding layer

UI Components are associated with business logic through this layer , this reduce lots of developer effort , it maintains row state , fetching mechanism etc.
Binding definition of components are defined in a XML file called page definition, Model layer uses this file to instantiate the page's bindings


A request scope map called Binding Container holds the bindings for the current page or view port and bindings can be accessed using EL Expression #{bindings}

Method to get Binding Container

importoracle.binding.BindingContainer;
importoracle.adf.model.BindingContext;


/*
*Method to get Binding Container of current View Port
*/
public BindingContainer getBindingsCont(){
return BindingContext.getCurrent().getCurrentBindingsEntry();
}


When we use data control to create any component on page then Jdeveloper automatically creates it's bindings in page definition XML file

Types of Binding

Attribute binding- Used to bind to a single attribute value such as EmployeesName, It is used to bind input text, output text etc

Action binding- Used to bind action command like Create, Delete, Commit etc, typically used with buttons , link etc

Tree binding- Used to bind a data collection like table, treeTable or list, It presents a collection of data having multiple attributes
Related post- Tree Table Component with declarative presentation in ADF, Access childs without custom selection listener

List binding- Used to bind simple lists of data as choice list

Method binding- Used to bind any custom method defined in any Java implementation class (Application Module or ViewObject Impl classes)
Related post- ADF Basics: How to invoke model layer methods from managed bean (Best Practice to write business logic in ADF)

Iterator Binding- Used to bind Attribute, tree bindng to iterator of data collection, Iterates over the business objects of the data collection and maintains the row state and properties

So this was an overview of ADF Binding layer and the reason why I like ADF Bindings is that It works as glue between both layers and we need not to code a single line for binding UI component to model layer
Suppose if I have to develop a form of Employees Details with CRUD and Search Operation then there is no need of writing a single line of code, all can be done using ADF Binding layer

#Thanks OTN



Viewing all articles
Browse latest Browse all 165

Trending Articles