Friday, 27 December 2013

What is OAF?

OAF is an Oracle Application Framework ,tightly coupled with Oracle Applications(Oracle ERP).
Using OAF we can develop Forms based on Oracle Apps Data Base and we can  run using Oracle Responsibility.

 OAF Vs Oracle Forms:

OAF Forms
Forms
OAF pages are light weighed pages.
Oracle Forms are heavy weighted compare to OAF.
Look and Feel is very good comparing to Forms.
Low level Look and Feel.
We can save development time.
Comparing to OAF page it will take huge time.
A page is divided into regions. Regions contain
fields, buttons, tables, and other components.
A form is divided into blocks; blocks contain the fields, buttons, and other components.
 OAF pages are integrated with the Java Top
 Forms are integrated with Application Top

How to find the correct version of jdeveloper:

  1. Click on About this page.
  2. Go to page context tab
  3. Here we can see OAFramework Version like 11.5.10.2CU.
  4. Search in meta link using above version and get the correct jdeveloper.
Now we got the Jdeveloper,next step is installation(setup).

Setup Jdeveloper for OAF:
  1.  Unzip the patch in any drive.
  2. Create a environment variable as below:   
Variable Name
JDEV_USER_HOME
Variable Value
C:\p6908968_R12_GENERIC\jdevhome\jdev\

 3.Go to Patchnum\jdevbin\jdev\bin and double click on jdev,you will get a window of jdeveloper.



After double clicking on jdev symbol we will get below screen.
Select the application and right click on application select new OAWorkSpace.
It will automatically prompt for work space name.
Next it will prompt for project.
Here default package name must be start with your project or client name like
custom.oracle.apps.<application short name(example:po)>.<component name(example:requisition)>.webui
In next step we will create a data base connection:



After that click on test tab and test the connection.
Next step it will ask for dbc file.Before selecting dbc file place your DBC file in jdevhome\jdev\dbc_files\secure folder and select the same file.


After completing of all of the above steps you will get below screen shows that project and work space.
 and click on save all to save the work.
we can see the .jws and .jpr files in \jdevhome\jdev\myprojects.

Thursday, 11 July 2013

Set Multi Org Access controls  from OAF Controller:

In R12  we have to set ORG_ID to use view objects in VO.

In Your controller just paste below code to set MO:

OAApplicationModule AM = pageContext.getApplicationModule(webBean);
      OADBTransactionImpl trx = (OADBTransactionImpl)AM.getOADBTransaction(); 
       AM.getOADBTransaction().setMultiOrgAccess(String.valueOf(trx.getOrgId()),String.valueOf(trx.getSecurityProfileId()),trx.getApplicationShortName());
  AM.getOADBTransaction().setMultiOrgPolicyContext("M", AM.getOADBTransaction().getOrgId());

Tuesday, 2 July 2013

Add a new Row in OAF:

Add a new Row in OAF:
OAViewObject vo=(OAViewObject)am.findViewObject("XxdKoelContractHeadersInfoEOVO");
     if(pageContext.getParameter("addrow")!=null){
   
     Row row= vo.createRow();
     vo.insertRow(row);
      }

Tuesday, 14 May 2013

ADF Introduction


The ADF Architecture

The Business Services Layer

Manages Persistence.

1     Object/Relational Mapping

2     Query/DML


Performs Validation.

1     Data Validation.

2     Business Logic.

Choices Of Implementation

ADF Business Components, JPA Entities , Web Services , Java classes.








ADF Business Components


A framework that simplifies the developing JAVA EE business services for developers who are familiar with 4GL tools ,declarative development,relational databases.

Simplify the data access.

Simplify validation and business logic.

Uses SQL based data views

Separate the data view from business logic.

Implement the best practices.

Easy customization.






ADF Business Components Characteristics

    Provides data interaction & business logic execution.

    Maps to data source.

    Enables 4 GL development.

    Declarative and Visual Development.

    Implemented in Metadata.

    Enables business logic development.

    Declarative Business Rules

    Pre-defined java methods for events.

    Can expose application module as services.

    Based on Java and XML.












Artifacts of ADF Business Components.





 

Entity Objects

    Maps to row in a database tables.

    Handles insert , delete , update , lock operation.

    Define behaviour for attributes.

    Can contain validation and business logic.

Associations

    Define Relationship between EOs

    Facilitate Access to data in related entity objects

    May be based on database constraints.

    May be independent of database constraints.

    Are used in defining the validations and LOV

    Composite/Reference types.


View Objects

    Represent a query.

    Are used for joining , filtering , projecting ,  and sorting the business data.

    Enables you to have a view of data that is specific to one part of your application.

    Can be constructed from a SQL statement , static values or populated programmatically .

    Can also be based on any number of entity objects.

View Links

  Relationships between view objects.


Application Modules

     Interface to your application

     Contain an active data model the client uses to interact with view object instances.

     Control the connection to the database and keep track of all changes that affect data in the database.

    Can be nested/shared .