Tuesday 16 December 2014



THE ORACLE ADF ARCHITECTURE
Oracle ADF is based on the Model-View-Controller (MVC) design pattern. An MVC application is separated into: 1) a model layer that handles interaction with data-sources and runs the business logic, 2) a view layer that handles the application user interface, and 3) a controller that manages the application flow and acts as the interface between the Model and the View layers.
Separating applications into these three layers simplifies maintenance and reuse of components across applications. The independence of each layer from the others results in a loosely coupled, Service Oriented Architecture (SOA).
Oracle ADF implements MVC and further separates the model layer from the business services to enable service-oriented development of applications. The Oracle ADF architecture is based on four layers:
The Business Services layer - provides access to data from various sources and handles business logic.
--> The Model layer - provides an abstraction layer on top of the Business Services layer, enabling the View and Controller layers to work with different implementations of Business Services in a consistent way.
--> The Controller layer - provides a mechanism to control the flow of the Web application.
--> The View layer - provides the user interface of the application.


Oracle ADF lets developers choose the technology they prefer to use when implementing each of the layers. The diagram above shows the various options available for developers when building Oracle ADF applications. The glue that integrates the various components of Java EE applications and makes development so flexible is the Oracle ADF model layer. EJB, Web Services, JavaBeans, JPA/EclipseLink/TopLink objects and many others can all be used as Business Services for the Oracle ADF Model. View layers can include Web based interfaces implemented with JSF, Desktop Swing applications and MS Office front ends, as well as interfaces for mobile devices.


Creating dependednt picklist in OAF:

1)Create a VO with bind parameters.
2)In process request method get the item bean in to veriable.
3)set the properties like below mentioned:
OAMessageChoiceBean itemId=
(OAMessageChoiceBean)table.findChildRecursive("test");
itemId.setPickListCacheEnabled(false);
itemId.setListVOBoundContainerColumn(0,table(tableBean Id),"TableItemId")

Copy Functinality in OAF and ADF:(This functionality same in OAF and ADF)

To copy selected line first we need to get the line into row type.

Row selectedRows[] = vo.getFilteredRows("selected", "Y");
if(selectedRows.length >0){// Check lines are selected or not
for (int a = 0; a < manRows.length; a++) { SelectedVORowImpl copyrow = (SelectedVORowImpl)selectedRows[a]; for (int k = 0; k < a; k++) { Row newrow = vo.createRow(); try {//Dynamically setting value newrow.setAttribute(k,copyrow.getAttribute(k))); } catch (Exception e) { Row errorrow = errorVO.createRow(); errorrow.setAttribute(0,fileName); errorrow.setAttribute(1,t-1); errorrow.setAttribute(2,e.getMessage().toString()); removeRow="Y"; break; } vo.insertRow(newrow); } } }