0% found this document useful (0 votes)
22 views60 pages

OAF Oracle Application Framework: Satbir Singh Mobile:-9591144111

The document provides an overview of the Oracle Application Framework (OAF), detailing its architecture based on the Model-View-Controller (MVC) design pattern and its advantages over Oracle Forms. It explains key components such as Entity Objects, View Objects, and Application Modules, along with the rendering process and the use of Java concepts in OAF development. Additionally, it covers the setup of JDeveloper and various functionalities like Partial Page Rendering and calling concurrent programs.

Uploaded by

mohmmedhdx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views60 pages

OAF Oracle Application Framework: Satbir Singh Mobile:-9591144111

The document provides an overview of the Oracle Application Framework (OAF), detailing its architecture based on the Model-View-Controller (MVC) design pattern and its advantages over Oracle Forms. It explains key components such as Entity Objects, View Objects, and Application Modules, along with the rendering process and the use of Java concepts in OAF development. Additionally, it covers the setup of JDeveloper and various functionalities like Partial Page Rendering and calling concurrent programs.

Uploaded by

mohmmedhdx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 60

OAF

Oracle Application Framework


Satbir Singh
Email :- [email protected]
Mobile:- 9591144111

1
OA Framework
• Oracle Application Framework (OA Framework) is a
proprietary framework developed by Oracle
Corporation for application development within the
Oracle E-Business Suite.
• Available to customers for personalization,
customizations and custom-application
development.
• The OA Framework is a Model-view-controller
(MVC) framework built using J2EE (Java 2
Platform, Enterprise Edition) technologies.

2
Difference Between Oracle forms and OAF Pages

Oracle Forms OAF Pages

Oracle Forms are heavy weight and OAF Pages are light Weight and opens
take time to open quickly

Oracle Forms have limited look and OAF look and feel is very good
feel compared to Oracle forms.

Oracle Forms can not open the in OAF Pages can Open in Mobile
mobile devices and tablets Devices and tablets

Oracle Forms follows Client Server OAF follows MVC and Client Server
Architecture. Architecture Both

Oracle form is divided into blocks; OAF page is divided into regions.
blocks contain the fields, buttons, and Regions contain fields, buttons, tables,
other component and other components.

3
MVC Design Pattern
• OA Framework architecture is
based on Model-View-
Controller (MVC) design
pattern.

4
MVC Architecture
• Model
– Encapsulates Data
– Implemented using Oracle
Business Components for
Java (BC4J).
• EO (Entity Object)
• VO (View Object)
• AM (Application Module)
• View
– User Interface.
– Implemented using an
Oracle technology called
UIX (User Interface XML).
• Controller
– Code
– User actions are handled by
the OA Controller. (eg:
Clicking SUBMIT button)

5
Interaction between MVC Layers
• The interaction between
MVC layers can be
depicted as shown after
a page request is made
from the Browser.

6
Model

7
Entity Object
• Entity Object is based on database table
or other data source.
• Entity Object contains attributes which
represent database columns.
• Encapsulates Business logic
• Provide consistent data validation across
applications
• All insert/update/delete (DML Operations)
transactions go through EO to database.
8
View Object (VO)
• Represents a database query
• Provides iteration over the query result
• Two types VO
– SQL based
– EO based
• Is used for joining, filtering, projecting,
and sorting your business data.
• Can be based on any number of entity
objects (EOs) and provides access to
EOs.
9
Application Module (AM)
• Container for VOs.
• Every page must have a root application
module.
• Handles transactions.

10
View

11
View

•A sample OA
Framework
based page
looks like this.

12
View
• Each UI widget on OAF Page corresponds to one or more java objects
(beans)
• These objects are used to create HTML at runtime
• The java beans are defined hierarchically
• Use Oracle9i jDeveloper with OA Extension to create pages
• Pages are made up of a hierarchy of regions and items
• A region is a reusable container that holds items
• A region can contain
– Buttons
– Fields
– Images
– Headers
– other regions
• The top level of every page is a region with style "pageLayout"
• The order of items determine their position in a page or region

13
Controller

14
Controller (CO)
• Responds to user actions and directs application flow.
• Model objects like EO and VO can't be accessed directly from the
Controller Class, except AM.
• The OADBTransaction class encapsulates the JDBC connection for
your transaction
• You can use this object to create callable statements
• Such statements in turn call database functions or run select statements
and fetch data
• commit or rollback
• Access session level application context info viz: userName,
responsibility etc.

15
Onion Structure
• OA Framework
can be
extracted into a
series of
concentric
layers, like an
onion. Each
layer only
“knows” about
the layers
below it.
16
17
Java concepts used in OAF
OOPs (Object Oriented Programming System)
Object means a real word entity such as pen, chair, table
etc. Object-Oriented Programming is a methodology or
paradigm to design a program using classes and objects. It
simplifies the software development and maintenance by
providing some concepts:
•Class :- A class is nothing but a blueprint or a template for
creating different objects which defines its properties and
behaviors.
•Object :- Java class objects exhibit the properties and
behaviors defined by its class. A class can contain fields
and methods to describe the behavior of an object.
18
Object Oriented Programming
• Inheritance - When one object acquires all the
properties and behaviours of parent object i.e. known as
inheritance. It provides code reusability.
• Polymorphism - In java, we use method overloading
and method overriding to achieve polymorphism.
• Abstraction - Hiding internal details and showing
functionality is known as abstraction.
• Encapsulation - Binding (or wrapping) code and data
together into a single unit is known as encapsulation. A
java class is the example of encapsulation.

19
Java
• Variables :- A Java variable is a piece of memory that
can contain a data value
• Methods :- Methods are nothing but members of a
class that provide a service for an object or
perform some business logic.
• Constructor - A constructor in Java is a block of code
similar to a method that's called when an instance of an
object is created. A constructor doesn't have a return type.

20
BC4J
Business Components for Java is JDeveloper's programming
framework for building multitier database applications from
reusable business components. Such applications typically
consist of:
•A client-side user interface written in Java and/or HTML.
•One or more business logic tier components that provide
business logic and views of business objects.
•Tables on the database server that store the underlying data.
A multitier application built with the Business Components for Java framework
deploys views, business rules, and custom code in components that clients can
share. With the Business Components for Java framework, such components are
easy to build and maintain, easy to use and reuse, and easy to customize.
Components do not need modification to be deployed to any supported platform.

21
Meta Data Service
• Meta Data is available as a service. The data is
there in JDR tables, but all such data has to be
co-related, all fields, regions,buttons etc have to
be clubbed into a meaningful manner to make a
web page.
• MDS provides service to store & return page
definitions. MDS collates those definitions in
components/fields in a meaningful manner to
build a page.
• MDS provides API's to build XML definition from
the data in JDR tables.
22
JDR Tables
The meta pieces of OAF page is not stored as binary
files but as data in the table. When you design a
page, you store "page definiton" in XML format on
your pc. When deploying to your system/server, you
load this XML file into JDR tables by using command
xmlimporter. Below are those JDR tables where the
data is stored.
•JDR_ATTRIBUTES
•JDR_ATTRIBUTES_TRANS
•JDR_COMPONENTS
•JDR_PATHS
23
OAF Page Rendering Process
• OA Fwk Requests page definition/structure from
(MDS)
• MDS engine returns a xml file to OA Framework
• Each node/component in XMLis translated into a
web bean object.A bean object is nothing but an
object representation components like fields,
buttons, regions etc
• After rendering the page,OA Framework then
calls the controller class for that MDS page. The
page is displayed to user after processRequest in
Controller is completed.
24
Setting up JDeveloper 10g

25
Setting up JDeveloper 10g

• Right Click on My Computer,Select Properties


• Select the Advanced system settings and then advanced tab
then Click the Environment Variables button.
• In the Environment Variables dialog, select the New button at
the User variables for <username> box

26
• In the New User
Variable dialog, enter
JDEV_USER_HOME in
the Variable Name field.
Set the Variable Value
field to the location of
your jdev subdirectory

27
• Locate the Tutorial.zip file in your jdev
app/jdevbin directory.
• Open the zip file and extract it to your
jdevhome directory i.e. C:\jdev9\jdevhome
• Copy the following file V:\FTP\OAF\
gsitsi01.dbc to <JDEV_USER_HOME>\
dbc_files\secure
• Launch Oracle 9i JDeveloper.
• In JDeveloper select File > Open navigate
to the <JDEV_USER_HOME>\myprojects
directory and open the file toolbox.jws.
• In the System Navigator, select the Lab
Solutions.jpr project and right click it and
select Project Settings.

28
• In the Project Settings
dialog, expand the Oracle
Applications node and
select Runtime
Connection
• Select the “Browse”
button next to DBC File
Name and browse to the
file that was copied
earlier.
• Set username and
password to
fwktester/fwkdev
• Set Application Short
Name to AK
• Set Responsibility Key to
FWK_TOOLBOX_TUTO
RIAL_LABS
• Hit OK to save your
changes.

29
• Expand the Connections node in the
JDeveloper System Navigator, and then right
click the Database node, and select New
Connection and enter DB connection info.
• Click the Test Connection button. The result
should be success!.

•In the System Navigator locate the


EmpSearchPG.xml right click on it and select
“Run EmpSearchPG.xml” and the webpage
will start.

30
Parameters of Controller Method
1. OAPageContext
2. OAWebBean

OAPageContext
• To get and set values of the fields, using
oapagecontext.getParameter and
oapagecontext.putParameter
• For redirecting to the current page or another page. For
example to redirecting to current page itself use
oapagecontext.forwardImmediatelyToCurrentPage. Or
you may use oapagecontext.sendRedirect(snewpage)

31
OAPageContext
• To get a handle to application module(remember we
attached AM to page)
oapagecontext.getRootApplicationModule()
• Write debug messages, using
oapagecontext.writeDiagnostics
• Get message text from FND Message dictionary, using
oapagecontext.getMessage

32
OAWebBean
OAWebBean
•We can get a handle to any bean/component in that page
hierarchy. you can then invoke methods like setRendered etc
to change the behaviour of page at runtime.
•You can programatically create new bean components and
render those on a page at runtime.

33
Different Type of Regions in OAF
Regions are containers for different items in a page. In a page
there can be any number of regions inside regions inside
regions and many number of items inside a region. Every
region is a java bean acting as a container for region under it or
items.
Few commonly used region styles are

1) Page layout Region - pagelayout region is the highest level


layout. This is the top most region for every page by default.
Any number of region can be created under the pagelayout
region.

34
Regions
2) Messagecomponent Layout - This is a common region
styles which contains all the items starting with message
like messagetextinput, messagestyletext etc.These region can
have only this type of items.

3) QueryBean - Query bean is used when we do any search. It


has different panel like simple search,advanced search.
The different mode in the query region are result based search
and auto customization criteria.

4) Default Single column Region - This region is used for


holding the items in a single column.
35
Regions

5) Default Double Column - This is used for holding the items


in a doube column.
6) PageButton Bar - The region is the child of pagelayout level.
The item created under this region will be displayed at the
bottom and top of the page.
7) Train Region - When we have multiple pages then we use
the train to show the progress. A highlightedmark shows the
current page which you are in.
8) Table Region - The region is used for displaying data in a
tabular fomat.

36
Root AM and Its Concept
Root Application Module is the first application module created
for a project , set of pages or a single page.

Once the OAF page is called the root AM is called before the
MDS get into action for getting the page from JDR tables.

Root AM should not be extended and is not recommended or


supported by oracle and if there is any LOV fields in the page.
Root AM Extension will cause session time out when clicked
on the LOV.

37
SPEL and PPR
SPEL is Simplest Possible Expression Language. SPEL is
used to carry the values dynamically. SPEL will get the value
dynamically at runtime. Syntax of SPEL is
${oa.<view_object_name>.<Attribute_name>}

PPR is Partial Page Rendering. PPR is used to change the


contents of the page dynamically if certain events take
place. Fire partial Action is used to carry the Partial Page
Rendering. By using Partial Page Rendering, the entire
page is not refreshed. Only the changed portion of the web
page will be redrawn.This reduces the network traffic and
enhances the user experience.
38
Fire Action and Fire Partial Action
• FireAction is used to Submit the whole Form and whole
page will render again.
• FirePartialAction is user for Partial Page
Rendering(PPR). It will not cause whole page to render
again. It causes only partial refresh of page.
• Fire Action will do the form submit , cause entire page to
be rendered .
• FirePartial Action ( Similar to AJAX in java application )
only part of the page gets rendered or refreshed .

39
Calling CP from OAF
• OA Framework provides the ConcurrentRequest class to
call a concurrent program from the pages.
• The submitRequest() method of ConcurrentRequest is
used for calling a concurrent program.
• The submitRequest() method takes 6 parameters and
returns request id of the submitted concurrent request

public int submitRequest( String ProgramApplication ,


String ProgramName ,String ProgramDescription ,
String StartTime,boolean SubRequest,
Vector Parameters ) throws RequestSubmissionException

40
Parameters
• ProgramApplication -Application Short name of
application under which the program is registered.
• ProgramName - Concurrent Program Name for which the
request has to be submitted.
• ProgramDescription - Concurrent Program Description.
• StartTime - Time at which the request should start
running.
• SubRequest - Set to TRUE if the request is submitted
from another running request and has to be treated as a
sub request.
• Parameters - Parameters of the concurrent Request.

41
Discoverer Page , Technology stack

If you want to know information about the current page's


definition (particularly useful if you plan to personalize or
extend it) and the current page's context information, select
the page's About this page link.The "About" page renders
the following subtabs that display information about the page,
the page's context, and the environment:
•Page
•Personalization
•Page Context
•Technology Components
•Java System Properties
•Profiles
•Patches
42
About This Page
Page Subtab
The Page subtab, as shown below provides detailed
information about the Page Definition, Flexfield
References and Translatable Items of the page. Page
Definition HGrid - displays the web bean structure of the
page along with the controller, application module, view
objects and view attributes associated with the web bean.
Business Component References Details - expand this
heading to display full package information about the
application modules, retained application modules, view
objects and controllers referenced by the page.

43
About this Page
Personalization Subtab
The Personalization subtab identifies any personalization that
are in effect for the current personalization context.
Page Context Subtab
The Page Context subtab displays the context information
that the current page is running against, such as the
database, application, responsibility, and so on. It also lists
any security rules being enforced and displays in an
HGrid, the current responsibility menu.
Technology Components Subtab
The Technology Components subtab shows the versions of
the major products and components of the current
technology stack
44
About This Page
Java System Properties Subtab
The Java System Properties subtab lists all java system properties in
alphabetical order
Profiles Subtab
The Profiles subtab lists those profiles that affect OA Framework
application behaviour and the values of those profiles at each level.
You may also use the LOV provided to query any other profile:
Patches Subtab
The Patches subtab, lists the patches that were applied to the current
environment, with the most recently applied patch listed first. If the
same patch was applied multiple times, only the most recent
application appears. If you know a specific patch number, you can
query for that patch number in the Included Patches region to
determine if the patch was included in an applied patch.

45
Personalization and Customization
• OA Personalization Framework which allows you to
personalize an Oracle E-Business Suite application page
without modifying any underlying code.
• All personalizations you make through the OA
Personalization Framework are added on top of the base
product meta data at runtime. These personalizations
never overwrite the existing base product UI and are
therefore preserved during upgrades and patches, and
can also be translated.
• Functional Administrator is the Responsibility where we
can manage the personalization like enabling ,disable the
personalization, delete the personalization or import and
export the personalization from one instance to another.
46
Profiles for Personalization
• FND: Personalization Region Link Enabled
Yes
• Personalize Self-Service Defn
Yes
• Disable Self-Service Personal
No
• FND: Diagnostics
Yes

47
Lab - Hello World

48
Lab – Hello World
• The Hello world page has
one empty field and one Go
button.
• This displays a message
when you enter a value in
the field and click the Go
button.
• Your final layout should
look like this.

49
Create Workspace
• Select File > New... to
open the New Object
Gallery.
• Choose General >
Workspace Configured
for Oracle Applications
• Modify the workspace
file name.
• Check the Add a New
OA Project check box.
• Modify the project file
name.
• Set the default package
name to
oracle.apps.ak.hello

50
• Uncheck the Use Repository
for Design Time check box
• Use the default Runtime
connection credentials
• In Project settings>run options
Select OADeveloperMode and
OADiagnostic, and move them
to the Selected Options List.
• OADeveloperMode provides
extra code checking and
standards checking at runtime.
• OADiagnostic enables the
Diagnostics button in the
global buttons at the top of the
page, overriding any
corresponding profile option
set for the application.
• You should always have these
two modes turned on during
development.

51
Create Page
• Right click on the
project and Create a
new OA components
page for the project.

• Name your page


HelloWorldPG. Your
page name cannot
include any spaces.
• In the Package field,
type the following:
oracle.apps.ak.hello.
webui

52
• Your initial page structure
appears with an initial
pageLayout region called
region1.
• JDeveloper creates this top-
level page layout region for
you automatically when you
create your page.
• Also a folder called
pageLayoutComponents is
created which contains a
standard corporate branding
image.

53
Modify PageLayout Region
• Change the ID property of region1
to PageLayoutRN.
• Verify that the Region Style property
is set to pageLayout.
• Verify that the Form property is set
to True.
• Verify that the Auto Footer property
is set to True.
• Set the Window Title property to
<your name>: Hello World Window
Title.
• Set the Title property to <your
name>: Hello World Page Header.
This becomes the page header for
the page (it appears under the blue
bar).
• Set the AM Definition property to
oracle.apps.fnd.framework.server.O
AApplicationModule (you will have
to type in the value). This is a
generic application module supplied
by the OA Framework.

54
Create Main Region
• Create a new region under the
PageLayoutRN, set the ID
property to MainRN
• Set the Region Style property to
messageComponentLayout
• Right click on MainRN and
create a New >
messageTextInput item
• Set the ID property to
HelloName.
• Verify that your Item Style
property is set to
messageTextInput
• Set the Prompt property to
Name
• Set the Length to 20.
• Set the Maximum Length to 50.

55
Create Button Layout
• Create a new
messageLayout in MainRN
and name it ButtonLayout
which serves as a Container
Region for the Go Button.

• In ButtonLayout create a
New Item and Set the value
of the ID property to Go.
• Set the Item Style property
to submitButton.
• Set the Attribute Set property
to
/oracle/apps/fnd/attributesets
/Buttons/Go.

• Click File- Save all, rightclick


on HelloWorldPG and Run.

56
Add Controller logic
• Add a controller to display a
message when the user
clicks on the Go button.
• Select your second
region(MainRN) and choose
Set New Controller... from
the context menu.
• Give your controller the
package name
oracle.apps.ak.hello.webui
and an appropriate class
name, such as
HelloWorldMainCO, and
click OK.
57
• Code the processFormRequest() method as
public void processFormRequest(OAPageContext pageContext,
OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
String userContent = pageContext.getParameter("HelloName");
String message = "Hello, " + userContent + "!";
throw new OAException(message, OAException.INFORMATION);
}
}
}
• Build your controller by selecting Rebuild from the
context menu within the code editor window.
58
Run HelloWorld Page
• Save all files and run
the HeloWorldPG.
• Enter a name and click
Go.
• You should see a
message at top as
shown here.

59
Thanks

60

You might also like