Вы находитесь на странице: 1из 266

- What is OAF ?

Friday, December 05, 2014


4:30 PM

What is OAF ?
Oracle Application Framework (OA Framework or OAF) is a proprietary framework developed by Oracle
Corporation for application development within the Oracle E-Business Suite (EBS)
Oracle Application Framework (OAF) provides visual and declarative approaches.
The OA framework is also available to customers for personalizations, customizations and customapplication development.
The OA Framework helps in creating self Service pages in Oracle EBS.
It controls the flow of the application.
This framework works on the basis of Java EE principles.
We must know the Basics of Core Java and Advanced Java to learn and incorporate OAF.
In OAF User Interface is Very Interactive.
We can view OA Framework pages in mobile phones which contain Internet browsing feature
OA Framework is J2EE based but it also supports various standards like HTML, XML, SQL, and JSP.
Importance of OAF in Oracle Apps:

These pages are designed in the user understandable format.


Its easy to deploy within a web browser.
It gives better performance over Internet and has faster transaction rate.
It requires no support or training for users and is more user friendly.
Mainly it provides security, integration, and customization
Mark this Unit Complete

General Page 1

- Difference Between OAF and Oracle Forms


Friday, December 05, 2014
4:31 PM

Difference Between OAF and Oracle Forms


Let us discuss a few differences between OAF pages and Oracle Forms:

OAF

Oracle FORMS

OAF Follows MVC and Client Server Architecture

Forms Follows only Client Server Architecture

These pages are light weight components

These are not light weight components

OAF Pages can be sent through mobile devices

Cannot be sent through mobile devices

OAF Pages can be connected through Oracle Apps Local


Machine

These cannot be connected (NOT APPLICABLE)

Good look and feel standards

Low look and feel standards when compared to


OAF

OAF pages are integrated with the Java Top

Forms are integrated with Application Top

Commit command always occurs in the Application


Modules (AM) Java code. By this command, the data is
transferred from OAF Cache to database.

The COMMIT_FORM or
DO_KEY(COMMIT_FORM) commands can be
invoked by any trigger that allows restricted
procedures.

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.

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 2

- Structure f OAF
Friday, December 05, 2014
4:32 PM

Structure of OAF
Let us discuss the architecture followed by OAF:

As J2EE follows MVC architecture, OAF also follows MVC architecture as its based on and follows J2EE.
The abbreviation of MVC is Model View Controller.
MVC is the clean design interface between Model, View, and Controller.
MVC is software pattern for implementing the user interface.
It divides a software application into three interconnected parts which makes the implementation of request
and response easier.

Model mainly consists of application data, business rules, logic and functions.
Model contains the components which handles data directly from Database. It includes business components
for Java which mainly are:

Entity Object (EO)


View Object (VO)
Callable Statement (PL/SQL Statement)
Prepare Statement (Single Select Statement)
OADB Transactions (Oracle Apps Data Base Transactions)
View can be any output representation of information, such as a chart or a diagram. is nothing but the OAF
Page Output.
View is implemented by UIX (User Interface XML). A view is told by the controller all the information it needs
for generating an output.

The view is updated with the change and the representation as given by the model time to time.
The view in OAF comprises of various page level items like text fields, buttons, regions, links etc. These are
visible on any OAF page.

General Page 3

Controller accepts input and converts it into commands for the model or view.It can also change the views
presentation of the model.

Controller has got three methods:

Process Request ( The request is called when the page is rendered)


Process Forms Request (HTTP Get)
Process Form Data (HTTP Post)
HTTP get: This method is used only to read the information. It is to obtain a resource without changing
anything on the server.
HTTP Post: This method is used to modify the information and update the information on the server.

The figure given below shows the interaction between Model, View, and Controller:

We will discuss in detail about MVC architecture in the next chapters.


Previous Unit
Mark this Unit Complete

Next Unit

General Page 4

- Onion Structure of OAF


Friday, December 05, 2014
4:32 PM

Onion Structure of OAF

Onion structure is another structure of OAF.


The OA Framework can be extracted into a series of concentric layers.
Each layer knows only about its next consecutive layer.
The below figure shows the Onion Structure, in which AM interacts with the VO.
VO interacts with EO. EO interacts with Data Base.

The core layer represents the database and the surface layer represents the application pages.
In between is a number of business logic and user interface layers.
This layering allows for generic code and components to be implemented at the inner layers to maximize
their reuse across the outer layers
Previous Unit
Mark this Unit Complete

General Page 5

- DIFF OAF & FORMS


Friday, December 05, 2014
4:33 PM

Difference Between OAF and Oracle Forms


Let us discuss a few differences between OAF pages and Oracle Forms:

OAF

Oracle FORMS

OAF Follows MVC and Client Server Architecture

Forms Follows only Client Server Architecture

These pages are light weight components

These are not light weight components

OAF Pages can be sent through mobile devices

Cannot be sent through mobile devices

OAF Pages can be connected through Oracle Apps Local


Machine

These cannot be connected (NOT APPLICABLE)

Good look and feel standards

Low look and feel standards when compared to


OAF

OAF pages are integrated with the Java Top

Forms are integrated with Application Top

Commit command always occurs in the Application


Modules (AM) Java code. By this command, the data is
transferred from OAF Cache to database.

The COMMIT_FORM or
DO_KEY(COMMIT_FORM) commands can be
invoked by any trigger that allows restricted
procedures.

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.

Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 6

- Advantages and Disadvantages of OAF


Friday, December 05, 2014
4:33 PM

Advantages and Disadvantages of OAF


The advantages of OAF are as follows:
1.
2.
3.
4.
5.
6.
7.
8.

End user Productivity


Enterprise Grade Performance and Scalability
Highly extensible Architecture
These pages have only region and items, so we can develop pages faster.
Transaction rate is high when compared to internet.
Application Customizability.
Developer Productivity.
It mostly does not require support and training for users and is user friendly.
The disadvantages of OAF are:

1.
2.
3.
4.

Cannot see the layout at design time.


OAF Pages are integrated / compatible only with the Oracle Apps.
Drag and Drop options are not available.
More R&D is required to design a form layout which is time consuming.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 7

- About Model
Friday, December 05, 2014
4:34 PM

About Model
The entire Database related transactions in OAF pages will be taken care by the MODEL.

Model is where the application implements business logic.


Model will implement all the Data Base transactions.
Model component is implemented using BC4J where BC4J is Business Component for Java.
BC4J consists of three components:
Entity Object and Entity Associations
View Objects and View Links
Application Module
Model contains six components including BC4J components, additionally the other three components are:

Callable Statement
Prepare Statement
OADB Transactions
Callable statement is used to call a PL/SQL statements, Prepare statements are used if we are using single
SELECT statement, and OADB transactions will take care of Oracle APPS related Data Base transactions.

General Page 8

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 9

- Entity Objects and Entity Association


Friday, December 05, 2014
4:34 PM

Entity Objects and Entity Association


Entity Objects:

The entity objects are used if one wishes to do some insert/update operations.
Entity Objects represents a Data Base Row of a table.
Entity Objects will be based on the View (Oracle View), Synonyms or snapshots.
We need to create Entity Object if we want to perform DML operations on the OAF Page.
All the Entity Objects end with the EO.
Example: employeeEO

When we create Entity Object (EO) one subclass will generate.

We have two types of Entity Objects


I. PL/SQL based Entity Objects
II. Java based Entity Objects
Note: We have two types of tables in Oracle Apps they are Custom Tables and Seeded Tables.
If we want to perform the DML operations on the standard (Seeded) table then we go for PL/SQL based
Entity Object and if we want to perform the DML operations on the custom table then we go for Java Based
Entity Object.
Entity Association:

Entity Association is the relationship between two Entity Objects having one common column.
All the Entity Association ends with the AO (Association Object).
Example: EmpDeptAO
If we want to perform DML operations on Master Detail page then we go for Entity Association.
If we want to know common column between two tables then we will go for Entity Association.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 10

- View Objects and View Links


Friday, December 05, 2014
4:35 PM

View Objects and View Links


View Objects:

View Objects are used when we want some data to be displayed on page.
View Objects are used just for displaying purpose.
View Objects access the result set of a SQL statement, it can be either based on the Entity Object or plain SQL
query.
All the view objects ends with the VO
Example: EmployeeVO
When we create the View Object (VO) one subclass will generate with setters and getters method.

We have four types of View Objects and they are:


1) Manual VO

2) Automatic VO
3) Validation VO

4) Property VO

Manual VO: If we are writing our own SQL query then it will be called as Manual VO.
Automatic VO: Automatic VO is when we select an Entity Object automatically it will select the Query.

Difference between Manual and Automatic VO is:

If we want to perform DML operations then we can go for VO that should be based on Entity Object.
We go for Manual VO if we are using simple SELECT statement.
NOTE: Note that when we create VO (View Object) all the table columns will be converted into attributes,
hence here we call columns as attributes.

Validation VO:Validating the data in the Data Base, example using WHERE condition in the SELECT statement.
Property VO:Attributes / columns without Data Base columns comes under property VO. These attributes are
also called as Transient attributes.
Example: Suppose there is a table which holds student marks so therefore it contains 6 columns to hold six
subject marks for each student. There is no total column in the table to store the total marks of the student
separately. Now in the output for display purpose we are taking TOTAL attribute, hence which is not from
Data Base table and this TOTAL attribute is called Transient attribute.

General Page 11

View Links:
Relationship between two View Objects having one common column in both the VOs is called View Link. All
the View Link objects end with the VL
Example: DeptEmpVL
Note that if we want to display Master Detail data then we go for View Links, where as if we want to perform
DML operations on Master Detail data we go for Entity Association.
The below figure shows that how View Objects and View Links are interacting with Data Base, VO interacts
with Data Base Directly or VO interacts with Data Base through the EO.

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 12

- Application Module
Friday, December 05, 2014
4:35 PM

Application Module

It is very important component in the Model.


Every Oracle Application Framework (OAF) page should be attached to some Application Module.
It is the interface between the Client transactions and Data Base transactions.
All the application module objects end with AM.
Example: employeeAM

Whenever we create AM one subclass will generate.

Application Module is of two types and they are:


I. Root Application Module.
II. Nested Application Module.
If we are attaching AM to the Main Region of the page then it is called Root Application Module and if we are
attaching to the child regions (or) nested regions then it is called Nested Application Module.
The below figure shows what is Main region and what are child regions in OAF page.

The View Objects containing in the Main Application Module can be used anywhere in the child regions or

General Page 13

The View Objects containing in the Main Application Module can be used anywhere in the child regions or
Nested Application Module.
If the View Objects are attached to the Nested Application Module then those view objects are applicable
only to that particular nested region.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 14

- About View
Friday, December 05, 2014
4:36 PM

About View
View is the actual output OAF page what an end user can able to see.
In Oracle Apps Framework View is implemented using UIX technology, whereas UIX means User Interface
XML.
Whenever we run the page in JDeveloper then automatically UIX will generate web.xml file.
The power of UIX is that allows metadata to be translated to an HTML page for a web browser or mobile
device browsers.
The generated web.xml file will be converted into HTML format of OAF page.
Since web.xml file here will work as a cache memory.
Whenever we want to move the web.xml file into the server side then MDS repository is used to move the
web.xml file into the server.
MDS stands for Meta Data Service and in the application top we will be having MDS folder.
When we deploy all the OAF page destination paths, regions then the files will be stored into the MDS tables.
The MDS table are like:
JDR_Paths:Stores the path of the documents, OA Framework pages and their parent child relationship.
JDR_Components:Stores components on documents and OA Framework pages.
JDR_Attributes:Stores attributes of components on documents and OA Framework pages.
JDR_ATTRIBUTES_TRANS:Stores translated attribute values of document components or OA framework
pages.
JDR_DOCUMENT_ID_S: This is a sequence generator table.

MDS can be managed using standard database procedures and tools.


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

General Page 15

- About Controller
Friday, December 05, 2014
4:36 PM

About Controller

Controller will take care of the web browser activities.


The controller manages the flow between pages.
Controller responds to the user actions and directs application flow.
The controller will request from HTTP get and HTTP post.
All the controllers end with the CO.
When we create controller on subclass will generate.

Controllers have three methods:


1. Process Request (HTTP get).
2. Process Form Request (HTTP post).
3. Process Form Data.

HTTP get:This is used while loading the page.


HTTP post: After loading the page if we want changes.
Process Request: This method will handle HTTP get, for example while loading the page displaying the
default items.
Process Form Request: This method will handle HTTP post. After loading the page if we want to perform any
actions then we go for process form request. For example, after clicking button going to another page.
Process Form Data: This page is invoked upon a browser post. During this phase the framework will
automatically applies changes back to the underlying view objects. Rarely custom code is required in this
phase. If exceptions are thrown during this phase the phase is skipped and the page redisplays with the error
message.

There are two parameters in the controller:


1) OAPageContext
2) OAWebBean

OAPageContext:

To get and set values of the fields using the OAPageContext.getparatmeter and
OAPageContext.putparameter.
To call one page to another page OAPageContext.setforwardURL.
To redirect the current page itself use OAPageContext.forwardImmediatelyToCurrentPage (or)
OAPageContext.sendRedirect and many more.
OAWebBean:

Each and every field we have properties and the properties define the behavior of item.
OAWebBean represents the Hierarchy/Structure of the components in the page.
WebBean represents the properties of item.
As we discussed what Model, View, and Controller is, look at the below figure which shows that how they
generally interact with each other or how the data flow between them is.

General Page 16

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 17

- BC4J File Structure


Friday, December 05, 2014
4:37 PM

BC4J File Structure


BC4J stands for Business Component for Java, the following figure shows the file structure of Business
Component for Java where xxname stands for any user defined name and PO is the Application Short name
of Purchasing, Vision Operations (USA), and you can use other also, depending upon the requirement. In
place of XXAAM we generally use client name.
In the below figure we listed
BC4J of AM and VO
BC4J of EO
BC4J of LOV
BC4J of poplist
BC4J of Controller
BC4J of Page

General Page 18

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 19

- Identifying JDdeveloper Version


Friday, December 05, 2014
4:37 PM

Identifying JDdeveloper Version


Let us see how to identify the JDeveloper for the Oracle Apps Instance Version.

Step 1: If we observe we will find an option called About this Page in OAF Page. Click on the link About this
Page. The same process is shown in the below figure:

Sometimes you may not find an option called About this Page, for that you need to set one Profile Option in
Oracle Apps. The name of the profile option is Personalize Self-Service Defn. Switch to the responsibility,
System Administrator.
The navigation to select the profile option is: System Administrator -> Profile -> System
The same navigation is shown in the below figure:

General Page 20

After that select the Display level as Site and down in the Profile give name like Persolalize%Self%, the
same scenario is shown in the below figure:

After entering, click on Find button then you can see full profile option name. At site level select YES option
to activate About this Page link in the Oracle apps Framework page. The same scenario is shown in the below
figure:

General Page 21

Step 2: After selecting About This page we can see another window, in that select a tab called Technology
Components and after selecting that tab we can see the option called OAFramework which shows the
version name of OAFramework. The same scenario is shown in the below figure which is showing the version
number as 12.1.3.

Step 3: Now you need to download the JDeveloper patch of the version which we identified in Technology
Components. All the patches we can download from Oracle Meta link, and the file size is 500+ MB. The below

General Page 22

Components. All the patches we can download from Oracle Meta link, and the file size is 500+ MB. The below
table lists some patches related to the versions:

Oracle Apps Release Version JDeveloper Patch


12.1.0

Patch 7315332

12.1.1

Patch 8431482

12.1.2

Patch 9172975

12.1.3

Patch 9879989

The below picture shows the patch of the version 12.1.3:-

Extract the ZIP file and open the patch folder you will find three folders, as shown in the below figure
contains jdevbin, jdevdoc, jdevhome:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 23

- Installation Process of JDeveloper


Friday, December 05, 2014
4:38 PM

Installation Process of JDeveloper


Let us see the installation process of JDeveloper, after opening the un zipped file you will find three folder
called jdevbin, jdevhome, jdevdoc, the below figure shows the same scenario:

In the next step open jdevbin folder in that you will find a jdev folder again open jdev folder the you can see
bin folder, after that if you observe we can find jdev and jdevW icons. The jdev is for UNIX environment and
jdevW is for Windows environment. The same scenario is shown in the below figure stepwise:

General Page 24

Now send a shortcut of jdevW to desktop .


The below figure shows the same scenario, have a look into it:

General Page 25

Now you can see the shortcut of JDeveloper directly on Desktop

Previous Unit
Mark this Unit Complete
Next Unit

General Page 26

- JDeveloper Configuration Steps


Friday, December 05, 2014
4:39 PM

JDeveloper Configuration Steps


Let us discuss how to configure JDeveloper in our system, we are here discussing in Windows environment
step wise.

Step 1: First step is we need to set the Jdev environment variables for windows. Go to environment variable
in windows properties. Right Click on Computer/My Computer select properties. The same scenario is shown
in the below figure.

Select Advanced System Settings after choosing the Properties of Computer, the same scenario is shown in
the below figure:

General Page 27

Now in the top User Variables select New Button for adding a New User variable as show in the below figure:

General Page 28

Note that you must give Variable name as JDEV_USER_HOME and Variable Value is the path of the
jdevhome\jdev. Let us consider as a example I downloaded the patch and extracted it to Bharath \Softwares
in D: drive now my path for Variable value is:

D:\Bharath\Softwares\p9879989_R12_GENERIC\jdevhome\jdev
The same thing is shown in the below figure:

Step 2: After setting Variable name and Variable value we need to select DBC file into from Oracle Apps fnd
top, copy DBC file and paste it in JDeveloper patch.
To know where exactly the DBC file is located in Oracle Apps go to About this Page and select Java System
Properties tab then in the list we can find an System Property called DBC FILE, in the Value behind to DBC FILE
is the path where exactly the DBC file located in the Oracle Apps.

The same scenario is shown in the below figure:

Step 3: After finding where exactly the DBC file located go to that particular path and copy the DBC file (note
that dont delete the dbc file and also dont cut it).
Here we are using WinScp which connects to the server from our desktop system, we can also use putty to
connect to the server or any other tool which works similar like WinScp or Putty connection manager.
Install WinScp and the following figure shows the icon how it look like:

General Page 29

Install WinScp and the following figure shows the icon how it look like:

While giving path name directly dont give /naora1.dbc, according to the above figure give the path as
/u01/apps1/inst/apps/naora1_naapps/appl/fnd/12.0.0/secure

After giving path you will find DBC file just copy it, the same scenario is shown in the below figure:

After copying in your desktop system go to the jdevhome folder , then jdev, next dbc_files, and then next
secure, here we will not find any files or documents the folder is empty now we need to paste the DBC file
which we copied from the Oracle Apps Instance Server.

The following figures shows the same scenario:

General Page 30

Step 4: After pasting the DBC file now open the JDeveloper and create the Data Base Connection. After
opening the file it will ask for Configure File Type Associations, on check box check all the available types to
associate with JDeveloper. The below figure shows how the opening page looks like:

Step 5: Create a data base connection, go to Connections tab after that Right Click on Data Base folder and
then select New Database Connection, the same scenario is shown in the below figure:

General Page 31

After selecting New Database Connection Welcome to the create Data Base connection window opens
simply click on Next button. After that give the Connection Name here in the below figure if we observe the
connection name is NewtonApples, and the Connection Type must be Oracle (JDBC)

Click on next button after giving Connection Name, in the next window it asks for username and password
give Toad/Oracle SQL Developer tool connection name. The same scenario is shown in the below figure: -

General Page 32

After giving Username and Password click on the Next button, now you need to give connection details all the
connection details we even can find in DBC file, to check those detail open the DBC file with notepad there
you can find Host Name , JDBC Port, and Service Name. Give appropriate names and note that Driver type is
thin.

Now after giving proper names click on the Next button we can find Test Connection button click on the Test
Connection button to check the connection is success or not.

General Page 33

Click Next button and then click Finish button.

Step 6: This is the last step in JDeveloper configuration, set the JDeveloper default Project Properties. Go to
Tools Default Project Properties. The same scenario is shown in the below figure:

After selecting Default Project Properties from Tools menu, in the highlighted Project Properties extract
Oracle Applications and select Run time Connection.
The same scenario is shown in the below figure:

General Page 34

Now give the following details:


DBC File Name: Give the path where exactly the DBC File is stored which actually we copied from server to
our desktop system.
User Name: The user name is Oracle Apps instance User Name
Password: Password is Oracle Apps instance Password.
Application Short Name: Any application short name which user got access permit and also note that
whatever the application short name we are giving it must contain at least one OAF page and also that must
be attached to the responsibility of the User Name which we are giving.

Responsibility Key: Responsibility key of the Application Short Name.


The below figure shows the example showing DBC file path, User Name, Password, Application Short Name,
Responsibility Key. Just have a look into the picture.

General Page 35

Finally click on OK button, so that we finished our JDeveloper Configuration process.


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 36

- Welcome sample page


Friday, December 05, 2014
4:40 PM

Welcome (or) Sample Page Creation


Let us start OAF work with creation of First Sample Page.

To Create a page in Oracle Apps Framework (OAF) we need to follow six steps listed as:
i) Create .JWS ( Java Work Space )
ii) Create .JPR ( Java Project )
iii) Create BC4J for AM ( Application Module )

iv) Create AM ( Application Module ) in respective BC4J.


v) Create the page and attach to AM
vi) Give Window Title and Title name to the page.
Note that for R12 version no need to create BC4J separately it will be created automatically by JDeveloper.
Let us develop our first page step wise.

Step 1: Open JDeveloper, after opening we will find Application Navigator if not then select it from View ->
Application Navigator ( ctrl + shift + A ). Right click on Applications and then select New OA Workspace, the
same scenario is shown in the below figure:

Now give the File Name for Java Work Space, for example Welcome as shown in the below figure:

After giving File Name click on the OK button. After clicking on OK button button we can see Welcome
window to Oracle Applications Project Wizard.

General Page 37

Click on Next button, then we can see a window which asks for Project Name, give the project name for
example Welcome PRJ, Give the Default Package, for example
newtonapples.oracle.apps.po.welcomeprj.webui.

Click on Next > button, again click on Next > button then we can see. In Step 3 of 3 of Oracle Applications
Project Wizard we can see Connection details and Responsibility details which we added early in JDeveloper
Configuration Steps.
Click Next > and then Finish.

Step 2: After creating WorkSpace and Project we can see the +Welcome Project structure below to
Applications. Extract project (Welcome) and WorkSpace then we will find three folders namely
1. Application Sources
2. Resources
3. Web Content
Now, Create New Application Muduleby giving Right click on Resources you can select an option called New
Application Mudule
The same scenario is shown in the picture format:

General Page 38

Click on Next so that we will see Create Application Module as shown below. In the below figure observe
that we not yet changed the package name and also not specified the name for Application Mudule. Extends
we can see in extensions chapters.

If we observe in the above figure we not yet changed the package name for Application Mudule (AM). To see
the package structure we can see in the chapter BC4J file structure. So now we need to change the package

General Page 39

the package structure we can see in the chapter BC4J file structure. So now we need to change the package
name from webui to server and give name for the Application Module.

For example:

Click on Next > Button we will see Create Application Module Step 2 of 4 window no need to do any
changes here keep as it is and click on Next > Button again.

After clicking on Next button we will see Create Application Module Step 3 of 4 window here to no need
to do any changes simply again click on Next > button to move to another step.

After clicking on Next button without any changes we can see the below window and make sure that
Application Module Class:<nameof AM+impl> Generate Java File(s) check box must be checked. By default it
is checked if not just click on the box to Check.

General Page 40

Click on Next > button again or even we can click on Finish button here.

Click on Finish button so that our Application Module will be created.

Step 3: Now we need to create a page and attach it to the Application Module (AM). Let us see how to create
a page and how to attach it to the AM step wise:

Creating a Page
To create a page Right click on Resources and select New (ctrl+N) as shown in the below picture:

General Page 41

After selecting New option a New Gallery window gets open and left side in Categories extract Web Tier and
select OA Components after selecting OA Components from Web Tier select Page from Items list. The same
similar kind of scenario is shown in the below figure:

Click on OK button after selecting Page from the Items list, after that it will ask for the details of the page give
the name of a page and just check the Package generally no need to change. Click on OK button after giving
Name.

After that a page will be created with the given name. Check the Applications Navigator structure, Extract
Application Sources Folder, extract the Package and also extract Project, server, webui we can see the names
of AM, Page , and Project what we created, in the below figure PO is the Application short name of the ->
Purchasing, Vision Operations (USA).

General Page 42

Step 4: Now we need to attach page to the AM, for that follow the following steps:

Select the .xml page from the structure Webui

Down in the page structure (WelcomePG.xml Structure) select region1.

Change the ID value in the Property Inspector (note that the 3rd step is not mandatory if we want we can
ignore it as of now)

Select BC4J in Property Inspector and then select AM Definition click on the icon

to select the AM Definition.

Select Proper AM definition and then click on Ok.

Thats it we finished the process of attaching page to AM.

General Page 43

Step 5: Giving Window Title and Title of a page.


In the property inspector select Visual and in that we will find Window Title and Title give appropriate
names.
Window Title in the name which is displayed in Title bar and Title Comes inside the Page.

Now the last step is running the Program to see the output for that select the .xml page name Applications
Navigator and then Right Click on .xml page ( for example WelcomePG.xml ) and then later select Run (

)option.

General Page 44

The output of our page is as follows, have a look in to the below picture:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 45

- Displaying Images on Page


Friday, December 05, 2014
4:41 PM

Displaying Images on Page


Let us see how to put images in OAF. The following are the two ways we can keep images in OAF pages:
I) Changing the ORACLE logo to company branding logo.
II) Displaying Images in Page.

1) Changing the ORACLE logo to company branding image.


All the images in Oracle Applications are available in OA_MEDIA directory.

Step 1:
If we want to know the path where exactly the OA_MEDIA directory exists in Sever, Open a third party tool
which connects to the Sever in command prompt like Putty connection manager.
Type the following command in putty:
cd $OA_MEDIA
After that now type the following command which shows the path were exactly the OA_MEDIA directory
exists.
pwd
(Present Working Directory)

Step 2:
Now move the Image from the desktop system to the sever using putty or using other graphical user
interface tool like WinSCP.

Step 3:
Open the page which is already created ( example Welcome Page ), here we are taking the Welcome page
which is already created in the previous chapter.
Select the .xml page from Applications Navigator, and we know that we can see the page structure after
selecting .xml page if you didnt find the page structure then use the keyword Ctrl+Shift+s or go to View ->
Structure to select the Page structure palette.
In the page structure select CorporateBrandingImage.

General Page 46

In the Property Inspector of corporateBrandingImage we can see Image URL in Visual field as shown in the
below figure:

General Page 47

just remove the .gif file name and give the appropriate name i.e,. give the logo name which ever is move to
OA_MEDIA directory. For example look into the below figure:

Note that still now we not yet moved our sample or welcome page to the Oracle Apps Server instance so
there fore if we run the program then we cannot see the logo. To see the corporate branding image locally
move the image to the folder OA_MEDIA so that we can see the corporate branding image in OAF pages.
the OA_MEDIA folder will be available in the following path
<patchfile_folder>\jdevhome\jdev\myhtml\OA_MEDIA
Now run the page so that we can see our Corporate logo in the OAF Pages as shown below:

General Page 48

II) Displaying Images in Page.


To display a image in OAF page we need to create a Item first. Let us see how to create a Item, Right click on
the PageId in the Structure of the page select New -> Item as shown in the below figure:

After that select the item which we created just by clicking or selecting item, Property Inspector will be
highlighted in the Property Inspector select Item Style as image as shown in the below figure:
General Page 49

highlighted in the Property Inspector select Item Style as image as shown in the below figure:

Now after selecting Item Style as image now select the visual field in properties and give the image path
which you want to display in Image URI field as shown in the below figure. Note that we need to move the
image as usually to the respective OA_MEDIA folder/Directory.

Run the page and see the output we can find the images as shown below:

General Page 50

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 51

- Creating Items and Regions In a Page


Friday, December 05, 2014
4:42 PM

Creating Items and Regions In a Page


In this lesson we will learn how to create Items in OAF page and also we learn how to create Regions in a
page.
Here we are taking the same Welcome Page which we created /learned in the previous lesson.

Creating a Region in OAF page:


Select the .xml page in Applications Navigator. In the page structure Right click on PageId (example
WelcomePageId which we created early in the previous lesson Welcome Page and then select New ->
Region

By default JDeveloper takes it as a Header region. We got different types of regions available in the
JDeveloper, which are:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.

advancedSearch
advancedTable
bulletedList
cellFormat
contentContainer
contentFooter
defaultDoubleColumn
defaultFormStack
defaultSingleColumn
defaultStack
flexibleLayout
flowLayout
gantt
graphTable
hGrid
header
hideShow
hideShowHeader
labeledFieldLayout
messageComponentLayout
navigationBar
pageButtonBar
popUp
query
rowLayout
shuttle
stackLayout
sub TabLayout
switcher
table
tableLayout
train
tree

General Page 52

Give some text in Visual -> Text:, for example Header Region text field as shown in the below figure:

Run the page after giving Text field value and see the output the output will look like:

In the output observe how the Header Region is appearing and how it looks like we will discuss some
important regions which we generally use in OAF pages in the coming chapters.

Creating Items in OAF page:


Let us see how to place items in the OAF Page regions and how to place items in the OAF page:
Here we already created a Header Region and if you observe in the above picture the id value of the region is
region1 .
Right click on the region1 select New -> Item as shown in the below figure:

General Page 53

Now we can see item1 got created under region1.


In the item1 properties if we observe the default style of the item is messageTextInput (which takes input
values from user) and give some text for prompt ( for example Header Region Item1 :). The same scenario
is shown in the below figure:

General Page 54

We have different styles for items which are listed down:


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.

attachmentLink
attachmentTable
button
exportButton
flex
formParameter
formValue
formattedText
image
link
messageCheckbox
messageChoice
messageDownload
messageFileUpload
messageInlineAttachment
messageLovChoice
messageLovInput
messageRadioButton
messageRadioGroup
messageRichTextEditor
messageStyledText
messageTextInput
rawText
resetButton
richContainer
richTextEditor
separator
serveletInclude
spacer
staticStyleText
submitButton
tip
urlInclude

General Page 55

33. urlInclude
Similarly create one more item in the header region, and for item2 in the properties give prompt ( example
Header Region Item2 : ). So therefore the page structure looks like:

Now create one more item but create it on the pageID so that let us see how the items are going to be
displayed in the output, note that we dont know how the items appear in the page at design time and how
the output looks like.
Right Click on the pageID of page structure and then select New -> Item as shown in the below figure:

After that for the created item3 in Property Inspector give the promt (for example Item1 in the Main

General Page 56

After that for the created item3 in Property Inspector give the promt (for example Item1 in the Main
page : )
The same thing is shown in the below figure:

Now run the page and see how the page looks like.
The output of the page will look like the following, and observe how the items are displaying in header region
and how they are looking out of header region.

General Page 57

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 58

- How to display User Name, User Id and Responsibility in OAF


Friday, December 05, 2014
4:43 PM

How to display User Name, User Id and


Responsibility in OAF
In this lesson we are going to learn how to display Oracle Applications User Name, User Id, Responsibility
Name and Responsibility Id.
We will see little bit java programming too in this chapter.

Steps to follow:
1. Create a page first, see the chapter Welcome Page Creation to see how to create a page.
2. Create the region and four items in the region, we can see the creation process of Regions and Items in
previous chapter.
3. Create the controller and write the Java Code.
Here I am taking the page which is already created and adding a region with region style as message
Component Layout .
After adding Region under region here we are creating four items and Item style of all the four items is
message Text Input .
After adding Region and Items the page structure will look like:

Now change the prompt values for each items as follows:


(if you want to know how to change the prompt values in the Property Inspector see the previous chapter
which shows how to change the prompt value)
Prompt
item1 -> User ID
item2 -> User Name
item3 -> Responsibility ID
item4 -> Responsibility Name
The below picture shows how the output structure looks like after running the page, just have a look into it

General Page 59

Now we need to create a Controller, let us see how to create a controller in JDeveloper (OAF).
Best practice is to create the controller Globally so that it should be applicable to all the child regions.
Right Click on the Main Region and then select Set New Controller

After choosing Set New Controller, one dialog box window opens and it shows some default package and also
some default name, in Package name at last generally we will find .webui.webui change it to single webui
i.e,. nothing but remove one webui from the default package name, for example assume the defualt pakcage
is as follows:
newtonapples.oracle.apps.po.welcomeprj.webui.webui
change it to
newtonapples.oracle.apps.po.welcomeprj.webui
If you want to know why webui is there at end means you can see the BC4J file Structure lesson which
displays the file structures.
give the class name and we know that every controller ends with CO. For example give the controller name as
WelcomeCO as shown below:

Click on OK button after giving Class Name and also after deleting one webui from the package. Now if you
observe Applications Navigator structure controller is created under webui. Select the controller
(WelcomeCO.java) and see the java program how it looks.
In the java program WelcomeCO class is created which is extending OAControllerImpl which contains main
method.
We can also see two methods namely
1) public void processRequest(OAPageContext pageContext, OAWebBean webBean)
the above method is used whenever we want any logic to be implemented before the page gets loaded. It
means while loading a page if we want to display (or) perform any business logic then we go for
processRequest.

2) public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)


this method is used if we want any changes to be made once after the page gets loaded, i.e,. after the page is
loaded suppose after clicking on particular button if we want to display the result into another item or after
clicking on button if we want to go to another page.
As of now our requirement is to display the User ID, User Name, Responsibility ID, Responsibility Name
whenever page gets loaded automatically all the fields to be displayed in the respective items. So therefore
we need to write our program logic in the processRequest.

General Page 60

Look at the below figure we declared four variables of type String and if you observe for number/id values we
are just converting those values into the string. In the OAPageContext we will be having some defined values
which we can access as shown in the below figure using notation dot (.) we will get all the available values
and then we need to choose the required one.

pageContext is nothing but the variable name of the OAPageContext (OracleApps page Context), if you
observe to declared four variables we assigned values respectively.
Now after declaring variables and assigning values to the variables, we need to search for a items in our page,
if you observe we created four items item1, item2, item3, and item4. So therefore to find the items in the
page we need to use the bean as follows:
Here in this lesson we are not providing access to copy and paste the code of java, because whenever we are
typing code JDeveloper prompts us to import the packages automatically. For example look at the below
figure whenever we start typing, JDeveloper prompts us to click on Alt-Enter so that we can import the
required package. It just saves our typing time of importing a package.

General Page 61

After clicking on Alt-Enter it displays the packages list then choose the required import package. Here we are
typing OAMessageTextInput it is a bean if you observe we used item style as MessagetextInput we are just
adding OA (OracleApps) at the beginning and Bean at last which gives our Bean name. Now look at the below
figure which shows the imported package name:

If you observe first we initialized a bean and at the time of initialization we also need to import the respective
package and hence now we know that how to import automatically the required package. After that declare
a variable and we used java typecasting process here .
Every item has its own id so we used id value of the item to find the required item in the page.
Similarly write the code to find all the items in the page which we created.
Now after finding the items in the page we need to assign values which we got using pageContext into the
respective items. It means we need to set a value for each item in the page and for that we use the line code
as follows:

General Page 62

Similarly set values to all the items and after that the code looks like:

Rebuild the program after finishing the code, just Right click on the code area and then select Rebuild option
or we can also use a short cut code Alt+Shift+f9. Same scenario is shown in the below figure:

General Page 63

After successfully rebuilding the java program Run the page and see the output. The output of the page
which we created is as follows:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next UnitInserted from <http://newtonapples.com/start-course-page/>

General Page 64

- Message Component Layout Region


Friday, December 05, 2014
4:45 PM

Message Component Layout Region


In this chapter we are going to learn creation of regions in the page and for each region here we are taking
two or more items with item style as messageTextInput so that we will come to know that how the items
are placed in the regions. Each region will place items in different styles. Let us see some layout regions:

1) Message Component Layout Region

First create one Project which we learned in previous chapters like Welcome Page creation.
After creating a page, go to page structure and select region after selecting region right click on the region
and then select New-> Region. Now a region will be created under a page region.

After creating region change the region style to MessageComponentLayout in the property Inspector as
shown in the below figure:

Observe the property inspector and in the visual we added 1 to the rows and 3 to the columns, to see how
this rows and columns effect. See the output and observe the items how they are placed by JDeveloper
automatically, for that first create items under MessageComponentLayout region, here we created 5 items

General Page 65

automatically, for that first create items under MessageComponentLayout region, here we created 5 items
under the message component layout region and then after creating see the structure of the page how it
looks like:

Give the prompt names to each items and remember here we are taking item style as messageTextInput
for all the items, run the page and see the output to see how the items are placed in message Component
Layout region:

Follow the next lesson which shows Header Region how it looks like.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 66

- Header Region
Friday, December 05, 2014
4:45 PM

Header Region
In previous lesson we learned how the Message Component Layout region looks like and how to create it,
now using the same page here in this lesson we are going to see how the Header Region looks like and what
are the properties available in the Header region in JDeveloper.

Header Region Creation:


Right click on the main region and select the New -> Region as shown in the below figure:

Select the region style as Header and if we observe in the visual area we can provide Text, give some text like
Header Region and while when comparing this header region with the message component layout region we
can observe that in message component layout region we don,t have a option to provide Heading text where
as in Header region we can provide headings but item control is not there like rows and columns in
MessageComponentLayout Region.
The below figure shows the property inspector of Header Region just have a look:

Now after creating Header region create three items with Item Style as MessageTextInput:
v

General Page 67

Similarly create two more items to see the items arrangement in Header Region, and note that for all the
items the item style is MessageTextInput.

Give some prompt names to all the items:

After creating three items the structure of the page looks like the following:

General Page 68

Now run the page and see the output here we can identify the difference between Header region and
MessageComponentLayout region:

Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 69

- Row Layout Region


Friday, December 05, 2014
4:46 PM

Row Layout Region


In this lesson we are going to see how the rowLayout Region looks like and how the items are displayed
inside the Row Layout Region.

Creating Row Layout Region:


First create one page, here we are taking the same page which we created in the previous chapters and it
already contains MessageComponetLayout region and Header region.
Create one region, right click on the main region and then select New -> Region

Select region style as rowLayout in the Property Inspector, and if we observe the Property Inspector we
have Horizontal Alignment and Vertical Aligment .
Center, End, Left, Right, Start are the available alignments for Horizontal. By Default , Default is the alignment
type which is nothing but works as Start Alignment.
For Vertical Alignment Bottom, Middle, and Top are the available alignments.

The below picture shows the property inspector of Row Layout Region:

General Page 70

After creating RowLayout region create four items under the rowLayoutRegion and also give prompt names
for each created items under RowLayout region.
Now run the page and see the output, it displays all the items in single row.
The below figure shows how the output looks like and also observe that in the below figure how the items
are placed in MessgeComponentLayout region and Header Region along with the Row Layout region.

Have Questions ? Ask in the Unit Forums

Previous Unit

General Page 71

Previous Unit
Mark this Unit Complete
Next Unit

General Page 72

- Default Double Column


Friday, December 05, 2014
4:46 PM

Default Double Column


In this lesson we are going to learn about Default Double column region which generally displays Items in
only two columns, let us create a Default double column region and create some items init and see how it
looks like.

Creating Default Double Column Region:

First create one page in the project and then under the main page region create one new region.
Right click on the main region, select New -> Region.

In the property inspector select the region style as defaultDoubleColumn.


After selecting Region Style as Default Double Column we can see in the visual Text and Item URI fields are
available it means for Default Double Column we can give Text value to the region and also we can place any
images if required.

The below figure shows the Property Inspector of Default Double Column:

General Page 73


Now after creating Default double Column region create three items under Default Double Column region
and note that all the items the Item Style is messageTextInput and give some prompt name for all the created
items.

After creating items under the default Double Column region the page structure look like the following which
shows Default Double Column region and along with also shows items structure of Message Component
Layout region , Header Region , and Row Layout region.

In the above figure region5 is the Default Double Column.


Now run the page and see the output which shows how the items are placed inside the default Double
Column and also it compares with the other regions.

General Page 74

Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 75

- Default Single Column


Friday, December 05, 2014
4:47 PM

Default Single Column


In this lesson we see how to create Default Single column and how the items inside the Default Single column
appears in the OAF (Oracle Apps Framework) page.

Creating Default Single Column:


First create one page in the project and then create one region under the main region as shown in the below
picture:
Right click on the main region, select New -> Region.

Here we are taking the page which we created in the previous chapters. After creating the region select the
Region Style as DefaultSingleColumn, the below figure shows the Property Inspector of Default Double
Column.

Create three items under Default Single Column region and also give prompt names to each
MessageTextInput items created.
After creating three items and giving prompt names, run the page and see the output how the items in the
Default Single Column region are displayed.
In the below figure if you observe we can see the difference between other regions along with the Default
Single Column.

General Page 76

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 77

- Page Button Bar


Friday, December 05, 2014
4:48 PM

Page Button Bar


In this lesson we are going to learn how to create Page Button Bar.
In the Page Button Bar region the items what we placed under it we can see in top and bottom of the pages.
It means this region is helpful if we scroll down to the page and we need to click on some button to perform
certain action then we can create those items under Page Button Bar region.
The items inside Page Button Bar works just like in our mail accounts generally if we open a mail then we can
delete that mail by clicking on Delete button and if we observe in most accounts Delete button is available on
top of the mail and even bottom.

Creating Page Button Bar:

First create one page in a project.


Here we are taking the same page which we created early contains five other regions.
Under the main region in a page create one more region and select region style as Page Button Bar.

Creating new region

The property inspector of Page Button bar is:

General Page 78

Property Inspector of Page Button bar

After creating region with Region Style as Page Button Bar, create two items under the region and select
Item Style as SubmitButton.

Selecting Item Style


For one Submit Button item give prompt as Ok and for other give prompt as Cancel.

Now after creating items under the Page Button Bar region, run the page and see the output we can see in
the output items will be displayed on top and bottom of the page. Look at the below figure which shows the
look of output and also it shows how the items in the other region are placed:

General Page 79

Output of Page Button

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 80

- Query Region
Friday, December 05, 2014
4:49 PM

Query Region
In this lesson we are going to see how the Query Region is going to look in OAF page and what is the use of
the Query Region in OAF.

Generally we use Query Region in search pages.

So therefore we are going to see how to create this Query region in the next coming chapter called Search
Pages in OAF.

We have four types of searches in OAF.


1.
2.
3.
4.

Automatic Search Inline LOV


Automatic Search External LOV
Result Base Search
Manual Search
Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 81

- Text Input
Friday, December 05, 2014
4:49 PM

Text Input
In this chapter we are going to learn how to create Items and we will see some items in the OAF page how
they look.

We already seen in previous chapter that how many items are available and how to create a item.

Here we are going to see different types of items in OAF how they appear in the page.

Creating Message Text Input Item:


The Message Text Input items allows users to enter some text value by the user. For example in mail id User
Name, password we will find some text to enter and those kind of items here in OAF are called as Message
Text Input items.
First create one project and create one page under the main region create one Message Component
Layout region.

Creating new region in OAF

Create two Message Text Input items under Message Component Layout Region and give prompt names to
each item.

To make the item required one in the Property Inspector select showRequired and make to True so that the
items become required field.

General Page 82

Making Field Item required in OAF


Now for the item if we want the text in disable mode like the way we usually see while entering Password the
text appears in dots rather than displaying text. In OAF for that feature, select item and in Property Inspector
select Security -> Secret.
By default it sets to False make it True.

Hiding text like password in OAF


Run the page and see the output, the below figure shows the output which shows the Message Text Input
items what we created:

OAF message text inputlogin page output


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 83

- Message Styled Text


Friday, December 05, 2014
4:50 PM

Message Styled Text


In previous lesson we have seen the usage of Message Text Input which allows users to enter the text. Now
let us see how the Message Styled Text appears.

If we want a read only text in OAF output page then we can go for an item with Item Style as Message Styled
Text.

First create One Region (Message Component Layout Region) and then now create two items.
Select Item Style as Message Styled Text in Property Inspector (or) if we are using Message Component
Layout region then select New -> MessageStyledText.

Property Inspector of Message style text

Create two items for example and give some prompt name. Run the page and see the output:

General Page 84

Message Style Output


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 85

- Message Check Box


Friday, December 05, 2014
4:50 PM

Message Check Box


Let us learn how to create Check Box items in OAF.
Create two items under the region and select Item Style as messageCheckBox.

For the Message Check Box check the Property Inspector and we have some features like as follows:
Data:

Initial Value : Assigns a default value give this value to Y so that the check box will be checked by default.
Checked Value : This values will be assigned whenever the check box is checked.
Unchecked Value : Value when the item is not checked.
Initially Checked : If we want a value to be checked initially (automatically) then make this value to True.

The following figure shows the Default Data values for the second check box with prompt name as Check
box two.

Property Inspector of Message Check Box


Run the page and see the output here we will see other items too in the below figure along with the Check
Box items.

General Page 86

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 87

- Message Radio Button


Friday, December 05, 2014
4:51 PM

Message Radio Button


In this lesson we are going to learn how to use Radio Button items in the OAF page.
We can create individual Radio Button items in the page as a named set with mutually exclusive values. It
means we can place radio Buttons where ever we require in a page but if we provided a mutually exclusive
name to all those radio button items then only any one will be checked.

Let us see one small example how to create a Radio Button Items in the page:
Step 1: Create a page and create one Message Component Layout region in a page. Under the region create
four items and select the Item Style as messageRadioButton . Example see the below figure:

Creating Radio Button Item in OAF

Step 2: Now after creating Radio Button items give Id values to each items created and assign Prompt name
which ever you wish to display for the radio button.
Step 3: Set the checked value and unchecked value to each radio button in the Property Inspector.
Step 4: If we want radio buttons to behave as a group then we must programmatically assign them all the
same name by calling setName() for each radio button.

First create one controller and write the program in the processRequest().

General Page 88

Setting New Controller in OAF


Remove one webui from the package name and give controller name and note that every controller ends
with CO (general standard).

New Controller Package Name in OAF


Write the program in the processRequest(), here I am not providing any access to the code to copy and paste
it in the JDeveloper because whenever we write the code we need to import the package in the program
which we can get automatically from R12 series on wards.
For example whenever we are typing OAMessageRadioButtonBean then JDeveloper prompts us to use
Alt-Enter to import the required package. So as of now it is better practice to type the code rather than
copy and paste.
We already explained the concept of programming in previous Chapter (Displaying User Name, User ID,
Responsibility Name, Responsibility ID).

The below figure shows the written code in the processRequest():

General Page 89

Program to validate radio button


Now after righting the code rebuild the code by giving Right click on the program select option called Rebuild.
After successful compilation of program run the page and see the output, if we test the output radio buttons
we can select any one out of four available items because we set a unique names to all the items in the
program using variable Name . (dot) setName() method. See the code in above picture for confirmation.

The below figure shows output of the program which shows additionally other items too rather than radio
buttons:

General Page 90

Radio Button Output in OAF


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 91

- Message Choice
Friday, December 05, 2014
4:51 PM

Message Choice
In this lesson we are going to learn how to create Message Choice item in the OAF page.
The bean for message choice item is OAMessageChoiceBean.
Step 1: First create Item in the page and select Item Style as MessageChoice in Property Inspector.
Step 2: After creating the page create the VO (View Object) in respective BC4J and attach VO to AM
(Application Module).

Creating VO process:
Right Click on Resources folder of project and then select New View Object as shown in the below figure:

Creating New VO in OAF


After that a welcome page to create a View Object wizard window will open as shown below:

General Page 92

welcome page of VO in OAF

Click on Next button so that first step to create a VO will come and in that :
Package : Select the proper package name which we created for a project.
Name : give the name to the VO note that all the View objects ends with VO.

Step1 of VO in OAF

Click on Next button:

General Page 93

Entity objects of the view object

Click on Next Button, no need to select any package or attributes here:

Selecting VO attribute in OAF

Click on Next button without any changes:

General Page 94

step4 screen of VO in OAF

Click on Next button without any changes so that we can see the Query area to enter SQL query to retrieve
the data, write the SQL Query in the Query Statement

Query statement in VO of OAF

After writing the Query statement check whether the written Query is valid or not by clicking on Test so that
if the query is valid then it shows a message that Query is valid. After that click on Next button.

General Page 95

Attribute mappings in VO
Click on next button to step 8:

last step in creating VO


Click on next button and click on Finish button:

General Page 96

Finishing creation of VO in OAF


After creating VO (view object) we need to attach VO to AM (application Module). Let us see how to attach
VO to AM:

Attaching VO to AM:
Edit the AM which we created in the project, right click on AM and then select Edit <AM Name> as shown in
the below figure:

Attaching VO to AM in OAF
Select Data Model, extract the package in which VO is created select the VO after selecting the proper VO
click on the Greaterthan arrow symbol which is shown in below figure:

General Page 97

VO attachment to AM in OAF
After that we can see the VO is attached to the AM as shown in the below figure:

Attaching VO to AM
Click on Apply button and then on OK button so that the attachment process of VO to AM is over.

General Page 98

Step 3: Select the item properties in that do the following:

Attaching View instance in OAF

Picklist View Instance : Give the VO name


View Instance : Attribute Name, the displayed list values. (Column Name, in VO columns are converted
into
attributes).

Attaching View instance


View Attribute : Attribute Name

General Page 99

Attaching View attribute in OAF


Now run the page so that we can see the output with drop down list to pick some values. The below image
shows the output of Message Choice along with other items in OAF page.
Note that a drop down list can handle a maximum of 200 values.

General Page 100

Message Choice Output in OAF


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 101

- Submit Button
Friday, December 05, 2014
4:52 PM

Submit Button
In this lesson we are going to see how to create submit button in OAF page.
Here in this lesson we are going to see how to create Submit button Item in Message Component Layout
region, note that we cannot create Submit button directly in Message Component Layout Region for that first
we need to create Message Layout as shown in the below figure:

Message Layout in OAF


After selecting Message Layout item under that Item create one more item as shown in the below figure:

Item in message layout OAF


After creating Item under the Message Layout item select the Item Style as submit Button.

Submit button in OAF Property Inspector


Give prompt name to display on top of the button example Ok, run the page and see the output:

General Page 102

Button item output in OAF


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 103

- Message Rich Text Editor


Friday, December 05, 2014
4:52 PM

Message Rich Text Editor


Let us see how to create Message Rich Text Editor in OAF.
Rich textEditor Item style is deprecated to <Message Rich Text Editor>.
create item and select the Item Style as message Rich Text Editor.
Run the page to see the output . The below figure shows the Message RichText Editor with prompt as
Address.

Message rich text editor in OAF page


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 104

- Image Item
Friday, December 05, 2014
4:53 PM

Image Item
We already seen that how to create a Image in OAF page in previous lesson.
In this lesson we are going to see how to create Item in Message Component Layout region.
Directly we cannot create Image item in Message Component Layout Region, so therefore first we need to
create Message Layout item.

Message layout item

The below figure shows the Image item property Inspector under the Message Layout region:

the Image item property Inspector under the Message Layout region

In the Image URI give the path of the image which you want to display. Run the page and see the output:

General Page 105

Image item output in OAF


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

General Page 106

About Model

Entity Objects and Entity Association

View Objects and View Links

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

General Page 107

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

General Page 108

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home
About Us
Services

Courses
Course
Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 109

- Displaying Exception Messages Based on Condition


Friday, December 05, 2014
4:53 PM

Displaying Exception Messages Based on


Condition
Let us learn how to create an Exception messages in OAF. This lesson will take us to show that how to create
a Exception messages, alert messages, warning mesesages in OAF pages.
1. First create one page in a project.

2. Create the Region and two items.


One Item to enter text so take it as Message Text Input and another items is Submit Button. Hence we
already seen in previous chapters how to create Message Text Input item and Submit Button.
3. Create the controller and write the code in the process Form Request, we are going to write the code in
process form request because whenever we click on submit button based on the condition the Message
should be displayed.

Here we are creating one Message Text input item and three submit buttons each button will display
different messages.

The below figure shows the page structure contains :


Message Component Layout Region
Under it: Message Text Input Item
Message Layout Item
- under message layout item
Submit Button 1 with prompt : Exception
Submit Button 2 with prompt : Alert
Submit Button 1 with prompt : Warning

Page structure of exceptions in OAF

Now run the page and just see the output how it looks, the below figure shows the sample output and if we
observe there is no gap between Submit Buttons and Message Text Input Item.

General Page 110

Alert Messages in OAF

Now to create a space between buttons and items we have one item called spacer. Create two items under
Message Layout and select Item Style as spacer and in Property Inspector give width as 10.
Click on the spacer item hold it and drag it between the Submit Button items, in Message component Layout
region directly we cannot create spacer item so there fore create one message layout hold that item and
place between Message Text Input item and Message Layout Item which is created early.
Now under the second message Layout item create one item with Item Style as spacer and give height as
10 in Property Inspector.

After creation the page structure looks like the following:

Spacer Item in OAF

Create the controller under the main region and write the code logic in process Form Request.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);

General Page 111

if(pageContext.getParameter("item3")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.ERROR);
}
if(pageContext.getParameter("item4")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.CONFIRMATION);
}
if(pageContext.getParameter("item5")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.WARNING);
}
}

In the above code item3, item4, item5 are the id values of the Submit Button items with prompt Exception,
Confirm, Warning. Item6 is the id value of Message Text Input item.

The import package is :


import oracle.apps.fnd.framework.OAException;
Run the page and see the output. Give some text in Message Input Text and then click on the button to see
the messages displayed on OAF.

For example see the following:

Error Message in OAF


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

General Page 112

Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

About Model

Entity Objects and Entity Association

View Objects and View Links

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

General Page 113

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

General Page 114

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home

General Page 115

Home

About Us
Services
Courses

Course
Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 116

- Swapping The Value From One Field to Another Field


Friday, December 05, 2014
4:54 PM

Swapping The Value From One Field to Another


Field
In this lesson we are going to see how to swap a values from one field to another.
Steps to follow:
1. Create a Page and create Message Component Layout Region
2. Create two items one Message Text Input and other is Message Styled Text with prompts as Enter some
Text : and Entered Text :.
3. Create one button so that when we click on button swapping process to done.
4. Create Controller and write the Swapping logic in ProcessFormRequest.
(more)
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 117

- Displaying Data From Data Base


Friday, December 05, 2014
4:57 PM

Displaying Data From Data Base


In this lesson we are going to see how to display a data from the data base in OAF.

Follow the steps to display the data in OAF page from the Data Base:
1. Create the page.
2. Create the VO in respective BC4J and attach it to AM.
3. Create the controller and write the logicode in Process Form Request.

To create a VO right Click on the Resources Folder of the project and then select New View Object
To see all the steps that how to create the VO we can see in previous chapter.

Write the following Query statement in VO


SELECT * FROM mtl_system_items_b WHERE ROWNUM < 101

After creating VO attach VO to AM (Application Module).


Now select main page right click on the main region select New -> Region Using Wizard

After selecting Region Using Wizard then a welcome window will get open as shown below:

General Page 118

Click on Next button to see the first step:

After selecting proper AM we can see the VO attached to that AM in the Available View Usages, which is
shown below:

General Page 119

Click on Next button, in Step2 window select Region Style as table, the same scenario is shown in the below
figure:

In the next window we will find all the available attributes and in that select the attributes whichever
required to display.

General Page 120

Click on Next button then we will find a window in that we can change the prompt names if required and also
the style of the item we can change here we are taking all the items as Message Text input types.

Click on Next button and then click on the finish button.

General Page 121

After creating Region Using Wizard now create one more item and the Item Style is Submit Button. So that
the page structure looks like the following:

Now create one controller on the main region. Right click on the region1(Main region id) and then select Set
New Controller
Now after creating the controller write the following code in the process Form Request.

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processFormRequest(pageContext, webBean);

if(pageContext.getParameter("item1")!=null)
{

General Page 122

/* The below code line is used to initialize the application module */

OAApplicationModule am=(OAApplicationModule)pageContext.getApplicationModule(webBean);

/* The below code line is used to initialize VO*/

OAViewObject vo=(OAViewObject)am.findViewObject("ItemsVO1");

/* ItemsVO1 is the instance name in AM which is the original name of the VO */

vo.executeQuery();
}

Rebuild the code, run the page and see the output:

Click on the Go button so that it will display the records as shown below:

General Page 123

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 124

- Data Entry Page in OAF


Friday, December 05, 2014
4:59 PM

Data Entry Page in OAF


In this lesson we are going to see how to add data into the Data Base tables.
The following are the steps to follow:
1. Create the WorkSpace and Project.
2. Create the AM.
3. Create the page and attach AM to page.
After creating the above three steps now let us create one sample table to enter the data.
CREATE TABLE xx_newton_employee (empno NUMBER(7),
ename VARCHAR2(30),
salary NUMBER(10),
doj DATE,
address VARCHAR2(20),
--WHO COLUMNS
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER);

Now after creating table we need to enter the data into the table for that we know for any kind of DML
operations we need to go for Entity Object in OAF, so now let us create EO on the created table. The
following process shows how to create a EO in OAF.

In this lesson we are going to see how to add data into the Data Base tables.

The following are the steps to follow:


1. Create the WorkSpace and Project.
2. Create the AM.
3. Create the page and attach AM to page.
After creating the above three steps now let us create one sample table to enter the data.
CREATE TABLE xx_newton_employee (empno NUMBER(7),
ename VARCHAR2(30),
salary NUMBER(10),
doj DATE,
address VARCHAR2(20),
--WHO COLUMNS
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER);

Now after creating table we need to enter the data into the table for that we know for any kind of DML
operations we need to go for Entity Object in OAF, so now let us create EO on the created table. The
following process shows how to create a EO in OAF.

Creating EO:
Right click on the folder Resources which is under the Project in Application Navigator and then select New
Entity Object as shown in the below figure:

The below figure shows the welcome screen which we will see whenever we click on New Entity Object:

General Page 125

Click on Next Button, whenever we click on next button it shows user name in hide mode and password,
no need to do any changes here because generally we will set project properties, click on ok.

Click on OK button and then in Entity Object give Name for EO and select the proper Package name, in the
Database Objects select the proper table name:

Click on Next button so that we can see the attributes available in the Table (attributes are nothing but the
column names of a table which we selected, here all the columns will be converted into attributes).

General Page 126

Click on Next button where in that window we can set all the attributes and in that select the primary key
value if we are not selecting any attribute as primary key the by default it considers ROWID as Primary Key.

Click on Next button and in step4 no need to do any changes:

No need to do any changes simply click on Next button to see the step5.

General Page 127

Click on Next button without any changes:

Click on Finish button, so that EO will be created, here our EO name is InsertRecordsEO.
Now after creating EO we need to attach this EO to VO.
Create a new VO, and in step2 select the EO under the package, actually in step2 it prompts us to select EO.
The same scenario is shown in the below figure:

Click on Next button to see the step3 and in step3 now we can see all the available attributes of EO.

General Page 128

In step3 we need to select all the attributes which we want to include, after that click on next button and
in step5 we can see the Query generated, if we want any changes to made in that query then click on
Expert Mode which is unchecked, whenever we click on Expert Mode then the Generated Statement will
be highlighted so that we can modify the query if required:

Click on Next button and finish the VO creation, and now the EO is attached to VO.

After creating VO and attaching EO to VO now we need to attache this VO to AM for that edit the AM as
shown in the below figure:

After editing AM extract the proper package name of our project in that we can see the VO select that VO
and then click on > (Greater than symbol) arrow so that VO will be attached to AM, click on Apply button
and then OK button.

General Page 129

Select the page attach AM to the page and give Window Title and Title in the Property Inspector.
Under the Main region create One Message Component layout region create five Message Text Input Items
and one Submit Button, and one more reset Button.

Give Prompt names to all the items which are created accordingly, like :
item1 (Message Text Input item)
item2 (Message Text Input item)
item3 (Message Text Input item)

item4 (Message Text Input item)


item5 (Message Text Input item)
item6 ( Submit Button)
item7 (Reset Button)

After creating items now the page structure looks like the following:

Select each Item and then for each Message Text Input Items select View Instance and View Attribute. The
following pictures shows the selection process for one item.

Note that Data Type and Maximum length must be mapped properly to each item.
Selecting View Instance for an item click on view instance then click on the icon

so that the following window will get opens and then in that select the View Instance.

General Page 130

After selecting View Instance select View Attribute and then click on the icon

so that one window will get opens and in that select the proper attribute.

Now select the AM java program, the scenario is shown in the below picture:

General Page 131

Now create one new method in the AMImpl class, here the method name is InsertRecord, write the
following code in the AMImpl class :
public void InsertRecord()
{
InsertVOImpl vo= getInsertVO1();
OADBTransaction trans= getOADBTransaction();
vo.executeQuery();
Row v_row;
v_row = (Row)vo.createRow();
vo.insertRow(v_row);
}

In process request of Controller initialize the AM the following code shows the initialization process of AM
in controller.
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);

InsertRecordsAMImpl am=(InsertRecordsAMImpl)pageContext.getApplicationModule(webBean);
am.InsertRecord(); /* Name of the method which we created in AM */

In the Process Form Request now we need to write the code for the item Save or Add prompt button so
that whenever we click on that button the data will be added into the table.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);

InsertRecordsAMImpl am=(InsertRecordsAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("item6")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Employee Created sucsessfully",OAException.CONFIRMATION);
}

General Page 132

Now rebuild the code in AM and in Controller and run the page to see the output. Enter the data and click
on Add button to save the entered data into the table.

Run the SQL Query to see the output in DataBase.


SELECT * FROM xx_newton_employee;

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 133

- Calling One Form to Another Form


Friday, December 05, 2014
5:00 PM

Calling One Form to Another Form


In this lesson we will see how to call one page from the current page in OAF. To create link between two
pages we have pageContext.serForwardURL.
First create WorkSpace and project.
Create AM, create page and attach AM to the page.
Here we are creating VO which displays employee information which are entered using the previous chapter
page.
We know that to display data we need to create VO, attach VO to AM and then we need to execute the VO
query whenever we click on the button, so there fore for that we need to write the code in the Process Form
Request of Controller.
To know how to display data from the data base see the chapter called Displaying Data from DataBase.

Let us see the parameter list in pageContext.setForwardURL.


Example code is :

line1 : pageContext.setForwardURL (DestinationPagePath,


line2:
null,
line3 :
menu_context,
line4 :
null,
line5 :
params(null),
line6 :
RetainAM(true),
line7 :
ADD_Bread_Crumbs,
line8 :
Ignore_Messages);

line1 :- Destination Page Path : Complete path of the OAF page.


line2:- null : If we want to call oracle apps form then then in first line Destination page path is null and here
we will give the function name of the form. Line1 and Line2 are interlinked.
line3:- menu_context: We can include any number of menus as we require.
line4:- null: if we want only one particular menu then here we will specify that menu name and in line3 we
need to pass null, line3 and line4 are interlinked.
line5: -params(null) : If we want to carry the values then we pass those values here.
line6:- RetainAM(true): generally this will be set to true value.
line7: -Add_Bread_Crumbs: If we want the link to carry to next page and store in the memory.

line8:-Ignore Messages: It will restrict the messages to not to carry from one page to another.

In this chapter we used displaying data of employees information which are entered in Data Entry page of
previous lesson, if we want to see the employees information then we need to click on the button Get
Employee Information and to create a new employee we need to click on Create Employee button.

The page structure of the Project what we are using now contains one main region and under it One Table
Using Wizard Region, two submit buttons. The following figure shows the page structure:

General Page 134

If we run the page after creating VO and executing that VO whenever we click on the Get Employee
Information then the output looks like the following:

If we observe in the output whenever we click on the Create Employee button it must take us to the Create
Employee page which we created and seen in previous lesson.
Whenever we click on the Create Employee button then only it must take us to the Create Employee page
so for that we need to write the code in the processFormRequest of controller and the code in
processFormRequest is:

if(pageContext.getParameter("item3")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxapples/oracle/apps/po/insertingrecords/webui/InsertDataPG",
null,

General Page 135

null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

In the program item3 is the id value of the Create Employee button. When we rebuild the code
and run the page then the output looks like the following:

Now after clicking on the Create Employee button it leads us to Create Employee page:

General Page 136

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

About Model

Entity Objects and Entity Association

View Objects and View Links

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

General Page 137

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

General Page 138

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

General Page 139

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home
About Us
Services

Courses
Course
Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 140

- SPEL in OAF
Friday, December 05, 2014
5:01 PM

SPEL in OAF
SPEL stands for Simplest Possible Expression Language.
SPEL is used to carry the values dynamically. SPEL will get the value dynamically at runtime. SPEL is the
Boolean Value (True / False).

The syntax of SPEL is:

Now let us see the previous chapter output which shows the Employee Information when we click on Get
Employee Information button now the same output we are adding one image icon so that it appears to each
and every row as shown in the below figure:

General Page 141

Now we will see the process how to add edit image for each row in a table. For that first we need a page
structure as follows:

In the above page structure we created a region Using Wizard and the region style is Table. Item1 is the
submit button whenever we click on the Submit Button(Get Employee Information) it displays the employee
information as shown in the below figure:

General Page 142

Now go to the table region, right click on the table region select New -> Item.

In the Property Inspector of item do the following changes:

1. Select the Item style as image.


2. In Image URL give the name of the image for example for edit image we have predefined images in
p9879989_R12_GENERIC\jdevhome\jdev\myhtml\OA_MEDIA , give the following image in Image URI
/OA_MEDIA/detailsicon_enabled.gif.
3. In client action select Action Type as fireAction.
4. In client action give Event name as Edit
Now the page structure looks like:

Now run the page and click on the button Get Employee Information so that the output looks like the
above picture what we have seen early.

General Page 143

Now whenever we click on the image item then it must show us the information in different form, for that we
need to write the following code in processFormsRequest of controller:

if("Edit".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxapples/oracle/apps/po/insertingrecords/webui/InsertDataPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

In IF condition Edit is the Client Action Event Name which we have given. The remaining code logic is same
which we used in previous chapter takes us to create employee page but here we need to carry the data to
that page rather than creating employee.
To achieve these requirement we need to create a spell, keep continue reading so that we will come to know
how to create a SPELL in OAF.
SPEL creation in OAF, we know the syntax of SPEL now we need to create a SPEL for the image item in a table.

The SPEL value for the above is as follows:

${oa.EmployeeSearchVO1.Empno}
EmployeeSearchVO1 is the name of the VO which is used to get the details of employees.
Empno is the primary key value (attribute name)/ column name of the table in view.

Now we need to pass the above spel to image, for that select the image and then in Property Inspector,
Client Action -> Parameters

Once we click on the icon a Parameters window will get open in that, click on Add Parameters button and
then give some name (example pempno) in the value pass the SPEL what we created
( ${oa.EmployeeSearchVO1.Empno} ). After giving name and passing SPEL value in the Value field click on OK
button.

General Page 144

Now we need to call this parameter in the Create Employee page CO because whenever we click on the
image item in the table list showing employee details it takes us to the Create Employee Page but it will not
carry any values here our task is to carry values.
So therefore we need to write the code in processRequest of the controller class of Insert Employee details
page. The code is as follows:
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);

BharathAMImpl am=(BharathAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("pempno")!=null)
{
String hid = pageContext.getParameter("pempno").toString();
String whereclause = "EMPNO='"+hid+"'";
am.getEmployeeCreateVO1().setWhereClause(null);
am.getEmployeeCreateVO1().setWhereClause(whereclause);
am.getEmployeeCreateVO1().executeQuery();
}
else
{
am.InsertEmployeeRecord();
}
}

Now rebuild the code, rebuild the pages run the Employee Information Page, click on the Get Employee
Information button and then click on the image item which is displayed on each available rows so that it
takes us to create employee page but here it carries the row values. The sample output is shown in the below
figure:

General Page 145

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 146

- Search Pages
Friday, December 05, 2014
5:01 PM

Search Pages
In this chapter we will see how to create search pages in OAF and how many different types of search pages
are there in OAF.

We have three types of search pages in OAF

Automatic Search
Result Base Search
Manual Search
Automatic Search is again divided into two types:
1. Inline LOV
2. External LOV
Automatic Search and Result Base Search will take care by the Query Region where as for Manual Search we
have to write the condition manually.
We will see in the coming chapters how to create the search pages in Oracle Apps Framework.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 147

- Automatic Search Inline LOV


Friday, December 05, 2014
5:02 PM

Automatic Search Inline LOV


In this lesson we will see how to create Inline LOV search page.
Inline LOV is used to search with in the page.

The following are the steps to create Inline LOV


Step1: Create the new WorkSpace and project, create new page add AM to the page.
Step2: Create new VO in respective BC4J. While creating VO change the package name of BC4J to
.lov.server at end, generally List of Values VO ends with LOVVO and the example BC4J path is:

Package (BC4J) : xxinlinelov.oracle.apps.po.inlineprj.lov.server


VO name : InlineLOVVO
Query in the VO is:
SELECT first_name FROM PER_ALL_PEOPLE_F

The Application Navigator of the project now looks like:

Step3: Under the main page create new item and select item style in property Inspector as
MessageLOVInput.
We can find List of Values region under Message LOV Input item.
Right click on the List of Values region select New -> Table Using Wizard
Here we can create Table Style region only we cannot change the region style to another one.

See the below image it shows that how the page structure will look now:

General Page 148

Select the FirstName item under the table region and then in the property Inspector of that item check that
in the Functional, Search Allowed is set to True.

Step4: Select LOV Mappings in the structure of Message LOV input after that do the following changes in the
property inspector of lovMap1.

Functional:
LOV Region Item : FirstName (the item to display in the LOV region)
Return Item : item1 (the item to return)
Criteria Item : item1 (criteria item works like in where condition value)

Run the page and see the output. The first page of the output looks like the following:

click on the search symbol

so that it leads us to another page as shown in the below figure:

General Page 149

Check the Radio Button of which employee you want to choose and then click on Select button or use Quick
Select option to select the name which is required.

After choosing the name it will display in the Message Text Input item as follows:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 150

- Automatic Search External LOV


Friday, December 05, 2014
5:03 PM

Automatic Search External LOV


In this lesson we are going to see how to Create Automatic Search using External LOV and the uses of
external LOV in oaf. The difference between inline LOV and External LOV is inline lov is used only inside the
page where as external LOV we can use for other pages inside the project.
So therefore the use or advantage of External LOV is if we want a list of values to be used for other pages in
the project then we can create External LOV region and we can use the created region in any pages of the
project.

Steps to create External LOV in oaf are follows:

Step1: Create Workspace, project , AM and create one page assign AM to the page give page title and
window title.
For example :
workspace name : externlallov
Project Name : ExternallovPRJ
package name : externallov.oracle.apps.po.externallovprj.webui
AM name : ExternallovAM
AM Package name: externallov.oracle.apps.po.externallovprj.server

Step2: Right Click on the project select new as shown in the below picture.

After selecting new option we will see a gallery window in that extract web tier in categories select OA
Components and then select Region in items list.

General Page 151

After selecting region click on ok button so that a window will get open in that
Name : Give any user defined name
Package: Select the proper package of the project.
Style : select style as List of values.

Now one .xml region will be created under webui.

Step3: Create on VO under the lov package for example select the package name as follows:
externallov.oracle.apps.po.externallovprj.lov.server
VO Name is : externalLOVVO
Query in the lov is :SELECT FULL_NAME FROM PER_ALL_PEOPLE_F

Step4: Attach VO to the AM.


Step5: Under the region create one item and item style as Message LOV input. In previous lesson we already
seen how the Message LOV input item structure look like.

The below image shows how the Application Navigator and page structure of the project looks like:

General Page 152

Step6: Under the Message LOV input region create on table region using wizard. In the table region select
the proper package name and then as we attached our VO to the AM it will display our LOVVO so select that
VO and therefore a table region will be created with one item under it.
Step7: Select the Message LOV input item and in the Property Inspector of Message LOV input select External
LOV as shown in the below figure:

Click on the icon

so that the following window will get opens

General Page 153

Click on the Browse button and then select the proper package name for example see the below picture:

Click on the search button and then select the fully qualified name in the search results for example see the
below picture:

General Page 154

Click on OK button so that JDeveloper asks for confirmation in that click on OK button.

Step8: Run the page and see the output. The following three images shows the output and its work process

Click on the search image

so that it displays list of values as shown below.

General Page 155

Select any value whichever you want to select. Use Quick select or radio button process:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 156

- Result Base Search


Friday, December 05, 2014
5:03 PM

Result Base Search


In this lesson we are going to see how to create Result Base Search.
Result base search will give the search results so the results whatever we are seeing in the page are just for
display purpose we cannot select the resultant values like the way we select in Inline LOV or External LOV.

Steps to create result base search page in oaf:

Step1: Create Workspace, project , AM and create one page assign AM to the page give page title and
window title.

For example :-

workspace name : ResultBaseSearch


project name : ResultbasesearchPRJ

package name : xxresultbasesearch.oracle.apps.po.resultbasesearchprj.webui


AM name : ResultbasesearchAM
AM Package name: xxresultbasesearch.oracle.apps.po.resultbasesearchprj.server

Step2: Create new VO in respective BC4J, generally List of Values ends with VO and the example BC4J path is:
Package (BC4J) : xxresultbasesearch.oracle.apps.po.inlineprj.server
VO name : ResultBaseSearchVO
Query in the VO is:

SELECT PERSON_ID,
FULL_NAME,
DATE_OF_BIRTH,
KNOWN_AS,
NATIONALITY
FROM PER_ALL_PEOPLE_F

Step3: Attach VO to the AM


Step4:- After creating VO and attaching it to AM, in this step create new region under main region and select
the region style in property inspector as Query. It means we need to create a Query region under the main
region.

General Page 157

After creating Query Region in main region select the Query Region property Inspector and in Property
Inspector select Construction Mode as Result Base search as shown in the below figure:

General Page 158

Now in the page structure select the Query region, right click on the Query region select New -> Region Using
Wizard

Select Proper Application Module in the first step of creating region as show in the below figure:

General Page 159

In step2 select the region style as Table as show in the below image:

In step3 select the attributes of VO which you want to display in the output.

General Page 160

Finish the Region using wizard process.

Step5:- Run the page and see the output, if we observe in the output the Query region creates automatically
Go and Clear buttons.

Click on GO button to see the resultant output as shown in the below picture:

General Page 161

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

General Page 162

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

About Model

Entity Objects and Entity Association

View Objects and View Links

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

General Page 163

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

General Page 164

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home
About Us
Services
Courses
Course
Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 165

- Manual Search
Friday, December 05, 2014
5:04 PM

Manual Search
In this lesson we are going to see how to create manual search page in OAF manually. Manual Search page
we need to enter the data value to search for example employee names starting with A then we used to
type A% in oracle apps forms similarly in OAF the manual search page will work like.

Step 1: Create Workspace, project , AM and create one page assign AM to the page give page title and
window title.

For example :
workspace name : ManualSearch

Project Name : ManualSearchPRJ


package name : xxmanualsearch.oracle.apps.po.manualsearchprj.webui
AM name : ManualSearchAM

AM Package name: xxmanualsearch.oracle.apps.po.manualsearchprj.server

Step 2:- Create VO and attach VO to AM


VO Name is : ManualsearchVO
Query in the VO is :-

SELECT * FROM dept


WHERE deptno LIKE NVL(:1, deptno)
AND dname LIKE NVL (:2, dname)
AND loc LIKE NVL(:3, loc)

Step 3:- The below picture shows the requirement so there fore we need to create a page to achieve the
requirement.

General Page 166

Now if we observe the above image we need to create three Message Text Input items for search and two
button items.
After entering data in Message Text Input items and once we click on Go button then according to the search
item provided the resultant values must be displayed in the below table region.

Steps to construct the page like above picture:


step 1: Create one message component layout region
step 2: Under message component layout region create three message text input items.
step 3: Create one Row Layout Region under main region, under Row Layout Region create two Submit
buttons and if we want a space between two buttons then create one Spacer item between two submit
button items.

step 4: Create one region using wizard and select region style as Table, select proper package name in which
we created VO (ManualsearchVO).

After creating all the page structure may look like :

General Page 167

Step 4:- Open the java file of AM and create one method in AM and write the logic.
public void xxSearchParams (OAPageContext pc,OAWebBean wb)
{
String dno = null;
String dname = null;
String loc = null;
//ManualsearchVOImpl vo= getManualsearchVO1();
OAViewObject vo= getManualsearchVO1();
if(pc.getParameter("item1")!=null)
{
dno = pc.getParameter("item1").toString();
vo.setWhereClauseParam(0,dno);
}
else
{
vo.setWhereClauseParam(0,null);
}
if(pc.getParameter("item2")!=null)
{
dname =pc.getParameter("item2").toString();
vo.setWhereClauseParam(1,dname);
}
else
{
vo.setWhereClauseParam(1,null);
}
if(pc.getParameter("item3")!=null)
{
loc = pc.getParameter("item3").toString();
vo.setWhereClauseParam(2,loc);
}
else
{
vo.setWhereClauseParam(2,null);
}
vo.executeQuery();
}

Step 5:- Create the controller and write the logic for buttons in Process Form Request of controller and here
is the logic.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

General Page 168

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processFormRequest(pageContext, webBean);

ManualsearchAMImpl am=(ManualsearchAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("item4")!=null)
{
am.xxSearchParams(pageContext,webBean);
}
if(pageContext.getParameter("item6")!=null)
{
OAMessageTextInputBean msb = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
msb.setValue(pageContext,null);
OAMessageTextInputBean msb2 = (OAMessageTextInputBean)webBean.findChildRecursive("item2");
msb2.setValue(pageContext,null);
OAMessageTextInputBean msb3 = (OAMessageTextInputBean)webBean.findChildRecursive("item3");
msb3.setValue(pageContext,null);
}
}

Step 6:- After writing logic in AM and Controller rebuild the code and run the page to see the output.

The resultant page may look like the following figure:

Give some text in any Text input field and click on go button.

General Page 169

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 170

- MD-50 of Sample Project in OAF


Friday, December 05, 2014
5:04 PM

MD-50 of Sample Project in OAF


Let us see the MD-50 Functional Document of OAF project.
Note that here we are considering one Clinic called Newton Apples Hospitals which is no where located.

Project Requirement:
1. Every patient who is coming to clinic for checkup we need to create one OAF page through which we will
enter the details of the patient.

2. We need to create another page which shows the details of the patients it means this page is just a search
page.
3. One more page is for updating the patient entered details.
The following image shows the sample design format according to that we need to design our OAF page.

We guess every field what is there in the design page we know all are patient Details.
Only one field Review is what we need to know here, for every patient who come for initial checkup for him
the next two visits with in 10 days is free of cost and first time the patient is considered as new entry. So
there fore for the first time Review Entry is New.
If the patient is going to visit the clinic next time within 10 days then the patient details entered with
separate patient id but in place of Review rather than the new it will be entered as Review1 or Review2 (Rev1
or Rev2).
After entering the patient details the first and main page will be searching the patient details the below
picture shows the search page design format.

General Page 171

The above design shows the Search page design format.


According to the document we need to create Patient Entry page and Search Page additionally we are also
creating update and details page.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

About Model

General Page 172

About Model

Entity Objects and Entity Association

View Objects and View Links

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

General Page 173

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

General Page 174

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home
About Us
Services

Courses
Course
Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 175

- Creating First OAF Page In Project


Friday, December 05, 2014
5:05 PM

Creating First OAF Page In Project


In this lesson we are going to see how to create the first page in OAF according to our requirement.
The first page is nothing but the patient entry page.

Here we are going to create the patient entry page.


1. First create one Workspace and Project.
2. Create one AM
3. Create one page and attach AM to the page.
For example:
Workspace Name : StirlingVision
Project Name : StirlingPRJ

AM Name : StrilingAM
Package Name: xxstirling.oracle.apps.po.stirlingprj.server
Now according to the document that is based on MD-050 document we need to create the page structure of
Patient Entry page. The below figure shows the page structure with description of each item and regions.

Run the page and see the output, the below picture shows the output of the page.

General Page 176

Now for every value what we are entering in the field must be saved in the data base and for that we know
that we need to insert data into the table.

Create one table which stores the details of patients in Data Base. The Table with who columns is :
CREATE TABLE XXSTIRLING_PATIENT_ENTRY_TABLE(PATIENT_ID NUMBER(10) PRIMARY KEY,

PATIENT_NAME VARCHAR2(40),

REVIEW VARCHAR2(10),

PHONE_NUMBER NUMBER(15),

SEX VARCHAR2(7),

AGE NUMBER(3),

AMOUNT NUMBER(6),

DATE_CHECKED DATE,

ADDRESS VARCHAR2(40),

--who columns

LAST_UPDATE_DATE DATE NOT NULL,

LAST_UPDATED_BY NUMBER NOT NULL,

CREATION_DATE DATE NOT NULL,

CREATED_BY NUMBER NOT NULL,

LAST_UPDATE_LOGIN NUMBER);

Now after creating table we need to create one Entity Object in the project.

General Page 177

Create one Entity Object (EO) in the project


For example:
Entity Name : StirlingPatientEntryEO
Package : xxstirling.oracle.apps.po.stirlingprj.schema.server
After creating Entity Object Create one VO, for example:
View Object Name: PatientEntryVO
Package: xxstirling.oracle.apps.po.stirlingprj.server
Attach EO to VO while creating.
Attach VO to the AM.
After attaching VO to the AM give View Instance and View attribute to each and every item in the page and
check the data type and size of the attribute is mapped properly. We have seen the radio buttons so for both
Radio Button items give the same View Instance and View Attribute and Checked value for Male is MALE,
checked value for Female is FEMALE.

Radio Button validation in a page:


For Radio buttons only one radio button must be checked out of all available radio buttons for that we need
to write the code in the Process Request of the controller.

Create one Controller on the main region and write the following Radio Button Validation code in the Process
Request of Controller:
OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean)webBean.findChildRecursive("male");
var1.setName("Gender");
var1.setValue("Male");

OAMessageRadioButtonBean var2 = (OAMessageRadioButtonBean)webBean.findChildRecursive("female");


var2.setName("Gender");
var2.setValue("Female");

Add the corporate logo to the page.


Now for storing the data in the Data Base we need to open the AM file and create the method in the java file
of AM
public void xxinsertpatient()
{
PatientEntryVOImpl vo= getPatientEntryVO1();
OADBTransaction trans= getOADBTransaction();
vo.executeQuery();
Row v_row = (Row)vo.createRow();
vo.insertRow(v_row);
}

After writing the method in AM we need to initialize the AM in the Controller, write the following code in the
process Request of controller:

//in the proecessRequest after super class

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);

am.xxinsertpatient();

After initializing AM and the method of AM in controller, we have to write the validation code for Add button
so therefore we need to write the code in ProcessFormRequest for Add button as follows:

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if (pageContext.getParameter("item3")!=null)

am.getOADBTransaction().commit();

throw new OAException("Patient Data Entered Successfully",OAException.CONFIRMATION);

Now rebuild the code in the controller and also rebuild the code in the AM. After successfully rebuilding the

General Page 178

Now rebuild the code in the controller and also rebuild the code in the AM. After successfully rebuilding the
code run the page enter some date and click on Add button so that patient will be added.

The below figure shows the output of the page:

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 179

- Creating Search Page


Friday, December 05, 2014
5:06 PM

Creating Search Page


In this lesson we are going to see how to create the Search page according to the document.
According to the MD-050 document we need to create Manual Search Page. So let us see how to crate a
Manual search page step wise:
1. Create One new page on the project.
2. Attach AM to the project.
3. Design the page structure.

For example:
Page Name: SearchPG
Attached AM Name: xxstirling.oracle.apps.po.stirlingprj.webui

The below figure shows the page structure of the Search Page, which contains 3 message Text Input items for
searching and down one table layout region.
Here the search result will be displayed in table format so here we are adding images for update and detail of
the resultant rows in OAF page.

The below figure shows the page structure output of the Search Page:

General Page 180

Still now we just created the page structure but the page is not yet validated properly.
After creating page structure we need to create the Method in AM for search operation, it means if we are
entering patient Id then in the where condition SQL Query must filter the Rows according to the entered
Patient Id related similarly for Patient Name and Patient Phone Number too.

So therefore we need to write a SQL data retrieval Query, create one VO and write the Query in the VO
Qeury area:

VO Name: SearchVO
Package Name: xxstirling.oracle.apps.po.stirlingprj.server

Write the Following Query in the query region of VO:

SELECT * FROM XXSTIRLING_PATIENT_ENTRY_TABLE

WHERE PATIENT_ID LIKE NVL(:1, PATIENT_ID)

AND PATIENT_NAME LIKE NVL(:2, PATIENT_NAME)

AND PHONE_NUMBER LIKE NVL(:3, PHONE_NUMBER)

After Creating VO attach VO to the AM. After attaching create method in AM, the following code shows the
java code of creating Method in AM.

public void xxSearchPatient (OAPageContext pc, OAWebBean wb)


{
String pid = null;
String name = null;
String phno = null;

SearchVOImpl vo1= getSearchVO1();

if (pc.getParameter("item1")!=null)
{
pid = pc.getParameter("item1").toString();
vo1.setWhereClauseParam(0,pid);
}
else
{
vo1.setWhereClauseParam(0,null);

General Page 181

vo1.setWhereClauseParam(0,null);
}
if(pc.getParameter("item2")!=null)
{
name = pc.getParameter("item2").toString();
vo1.setWhereClauseParam(1,name);
}
else
{
vo1.setWhereClauseParam(1,null);
}
if(pc.getParameter("item3")!=null)
{
phno = pc.getParameter("item3").toString();
vo1.setWhereClauseParam(2,phno);
}
else
{
vo1.setWhereClauseParam(2,null);
}
vo1.executeQuery();
}

Create One controller in Search page and initialize the AM in the SearchPage Controller, note that we already
initialized AM in Patient Entry page Controller. Now we are initializing AM in SearchPage Controller, initialize
the AM in ProcessRequest as follows:

StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);

According to the page output we need to validate three buttons:


1. Search Button
2. Clear Button
3. Add New Patient.

Search Button, Clear Button, and Add New Patient buttons Validation code in Process Form Request is as
follows:

StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("item4")!=null)
{
am.xxSearchPatient(pageContext,webBean);
}
else
if(pageContext.getParameter("item6")!=null)
{
OAMessageTextInputBean mstb = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
mstb.setValue(pageContext,null);
OAMessageTextInputBean mstb1 = (OAMessageTextInputBean)webBean.findChildRecursive("item2");
mstb1.setValue(pageContext,null);
OAMessageTextInputBean mstb2 = (OAMessageTextInputBean)webBean.findChildRecursive("item3");
mstb2.setValue(pageContext,null);
}
else
if(pageContext.getParameter("item8")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

Rebuild the code and run the page the below image shows the search page with results after clicking on
Search Button:

General Page 182

If we observe in the output we created two image items one is for Update and Other is for Details of the
patients. We not yet validated the Edit and Update images.
The next lesson shows how to create Update page and the page structure of the Update page and output of
Update, but for Update the values must be carried so hence we know that to carry values we will create SPEL
in OAF.
Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 183

- Creating Update Page


Friday, December 05, 2014
5:07 PM

Creating Update Page


In this lesson we are going to see how to create Update page.

The update must contain the same details what we are entering while creating or adding patient, so there
fore the same page structure is required for us.
Create one page attach AM to the Page.
After creating the page go to the page structure of the Patient Entry page copy Region2 which is nothing but
Message Component Layout Region and simply paste it in the main region of search page.

After Copying the page structure we can see that same page structure is copied into the new update page
structure so that we can save some time rather than creating each item and changing the view instance and
view attribute and prompt names etc.,
If we observe we not yet created Update Button and after updating Patient details we need to go back to the
other main page, so for that another button need to be created.

Create two submit buttons with some space between the buttons looks good rather than placing them in
conjunction. So create one spacer item between region and one more spacer item between two submit
buttons.
Finally the Update page structure looks like the following image:

General Page 184

Run the page to see the output and for the new created page also we need to attach corporate branding
image.
The update page contains the details which are already entered so we just need to edit only few values or we
need to change only one or two changes like name is spelled wrong, amount entered is not correct or might
be refunded to the patient, etc.,

So therefore whenever on search page if we click on Update Image then it must take us to this update page
along with the details and after making changes we need to update the same row.
First let us write the code to validate the Update button and other button in the page.
Create the Controller in Update Page region, initialize the AM in the process Request of the controller:

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
am.xxinsertpatient();

Write the following code in processFormRequest, if you observe the code is similar code for update too like
the way we wrote for patient entry.

StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if (pageContext.getParameter("update")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Patient Data Updated Successfully",OAException.CONFIRMATION);
}

if(pageContext.getParameter("item4")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

General Page 185

The below image shows the output of Update page.

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 186

- Calling OAF Pages Using Update and Detail Image Icons


Friday, December 05, 2014
5:07 PM

Calling OAF Pages Using Update and Detail


Image Icons
In the search page we have seen two images for each and every row result one is to Update the patient
details with image icon

and another is for seeing the details and the image icon is

Now we need to validate the image items in the result and whenever we click on these image items it must
take us to another page along with carrying the values too, so therefore we need to create SPEL for each
image item and then we have to write the code in processFormRequest of search page controller.
SPEL value of Update icon: ${oa.SearchVO1.PatientId}

Parameter Name of Update Icon: pid


SPEL value of Detail Icon: ${oa.SearchVO1.PatientId}
Parameter Name of Detail icon: ppatientid

Write the following code in ProcessFormRequest of search page controller, continuing the previous code

.....................

.....................

}
else
if("update".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

General Page 187

}
else
if("detail".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

Now the entire code in the controller class of Search page looks like the following:

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processFormRequest(pageContext, webBean);

StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("item4")!=null)
{
am.xxSearchPatient(pageContext,webBean);
}
else
if(pageContext.getParameter("item6")!=null)
{
OAMessageTextInputBean mstb = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
mstb.setValue(pageContext,null);
OAMessageTextInputBean mstb1 = (OAMessageTextInputBean)webBean.findChildRecursive("item2");
mstb1.setValue(pageContext,null);
OAMessageTextInputBean mstb2 = (OAMessageTextInputBean)webBean.findChildRecursive("item3");
mstb2.setValue(pageContext,null);
}
else
if(pageContext.getParameter("item8")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if("update".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,

General Page 188

null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if("detail".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 189

- Final Code in AM, Update Page, and Patient Entry Page


Friday, December 05, 2014
5:08 PM

Final Code in AM, Update Page, and Patient


Entry Page Controller
There are few changes we need to made while calling or navigating from one form to another form.
So after all the final code in the Update page controller class looks like the following:

public void processRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processRequest(pageContext, webBean);

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
//am.xxinsertpatient();
if(pageContext.getParameter("pid")!=null)
{
String pid = pageContext.getParameter("pid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();
}
else
{
am.xxinsertpatient();
}
OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean)webBean.findChildRecursive("male");
var1.setName("Gender");
var1.setValue("Male");

OAMessageRadioButtonBean var2 = (OAMessageRadioButtonBean)webBean.findChildRecursive("female");


var2.setName("Gender");
var2.setValue("Female");
}

/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);

StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);


// am.xxinsertpatient();
if (pageContext.getParameter("update")!=null)

General Page 190

if (pageContext.getParameter("update")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Patient Data Updated Successfully",OAException.CONFIRMATION);
}

if(pageContext.getParameter("item4")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}

The above code is the Controller class code in Update Page.

Let us see the Patient Entry page controller code:

public void processRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processRequest(pageContext, webBean);

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("ppatientid")!=null)
{
String pid = pageContext.getParameter("ppatientid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();
}
else
{
am.xxinsertpatient();
}

OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean)webBean.findChildRecursive("male");


var1.setName("Gender");
var1.setValue("Male");

OAMessageRadioButtonBean var2 = (OAMessageRadioButtonBean)webBean.findChildRecursive("female");


var2.setName("Gender");
var2.setValue("Female");

General Page 191

/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);

StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);

if (pageContext.getParameter("item3")!=null)
{
System.out.println("Add button called");
am.getOADBTransaction().commit();
throw new OAException("Patient Data Entered Successfully",OAException.CONFIRMATION);
}
if(pageContext.getParameter("item9")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if (pageContext.getParameter("item11")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}

The code below is the code is the AM Java code, and note that we created only one AM for the entire project.
We created two methods overall in AM and the below code shows the two methods:

public void xxinsertpatient()


{
PatientEntryVOImpl vo= getPatientEntryVO1();
OADBTransaction trans= getOADBTransaction();
vo.executeQuery();
Row v_row = (Row)vo.createRow();
vo.insertRow(v_row);
}

General Page 192

public void xxSearchPatient (OAPageContext pc, OAWebBean wb)


{
String pid = null;
String name = null;
String phno = null;
//OAViewObject vo= getSearchVO1();
SearchVOImpl vo1= getSearchVO1();
if (pc.getParameter("item1")!=null)
{
pid = pc.getParameter("item1").toString();
vo1.setWhereClauseParam(0,pid);
}
else
{
vo1.setWhereClauseParam(0,null);
}
if(pc.getParameter("item2")!=null)
{
name = pc.getParameter("item2").toString();
vo1.setWhereClauseParam(1,name);
}
else
{
vo1.setWhereClauseParam(1,null);
}
if(pc.getParameter("item3")!=null)
{
phno = pc.getParameter("item3").toString();
vo1.setWhereClauseParam(2,phno);
}
else
{
vo1.setWhereClauseParam(2,null);
}
vo1.executeQuery();
}

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 193

- Dynamic Changes in OAF pages


Friday, December 05, 2014
5:08 PM

Dynamic Changes in OAF pages


In this lesson we are going to see how to change the same page behavior dynamically.

For example in our project if we look at the functionality whenever we click on the Detail page all the patient
details are showing but all are showing in Editable format and moreover the add button is also in active stage
whenever we click on Detail image in search page.
So therefore here our requirement and our task is whenever we click on Detail logo all the items and data
must be only in Read only stage and also the Add button must be in Disable mode.

To achieve these dynamic change in OAF pages follow the steps:


1. Edit the Patient Entry page VO.
2. Create one transient attribute in the VO.

Transient attribute in OAF is nothing but the attribute value which is not in the Oracle Data Base table. We
know that while creating VO all the Columns of table will be converted into Attributes or we call columns as
attributes in VO, so therefore transient attribute is one which we create temporarily to display some results
which will not effect data base tables.
For example Student marks are saved in different columns, but in data base assume that we are not
maintaining any column for total marks sum but if we want the total value to be displayed in OAF form so
therefore for that we will create on temporary or duplicate attribute value to hold total marks.

Let us see how to create transient attribute in OAF according to our requirement.
Edit the VO as shown in the below figure:

Right click on VO and select Edit PatientEntryVO or double click on the VO to open it.
After opening the VO select the Attributes value in left side as shown in the below figure:

General Page 194

After opening the VO select the Attributes value in left side as shown in the below figure:

Select New button which is located down to the attributes list, After selecting New button give new attribute
name, Type as Boolean, and in Updatable select a Radio Button option called Always, for example see the
below picture:

Click on OK button later click on Apply and OK button in View Object so that the transient attribute will be
created.
After creating transient attribute now create one SPEL value basing on patient entry vo, because we need to
do dynamic changes in this page only:

General Page 195

do dynamic changes in this page only:


${oa.PatientEntryVO1.xxReadOnly}
After creating SPEL pass this SPEL value in each and every item of a Patient Entry page region, pass the SPEL
value to all the items those we want them to act as a read only values, note that we cannot pass this SPEL
value directly to region because of that reason we have to pass in each item, now the question rises where to
pass SPEL value:
Pass the SPEL value in :
-> Select XML page and in page structure select the item.
-> In the property inspector Functional -> Read Only, here we will find True and False.
-> Remove the current existing True/False value and place the SPEL value which we created here.
Pass the SPEL values to all the items and even to ADD button item.
After adding the SPEL value go to AM and add the following additional line in the AM method which we
created to add patient as follows:
public void xxinsertpatient()
{
PatientEntryVOImpl vo= getPatientEntryVO1();
OADBTransaction trans= getOADBTransaction();
vo.executeQuery();
Row v_row = (Row)vo.createRow();
vo.insertRow(v_row);

//the below one is the additional line code

v_row.setAttribute("xxReadOnly",Boolean.FALSE);
}

In the Controller class add the following code, in code ppatientid is the parameter value of detail icon
which we already seen in the previous lessons so additionally we are adding three lines which are:
if(pageContext.getParameter("ppatientid")!=null)
{
String pid = pageContext.getParameter("ppatientid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();

// add the following lines


OAViewObject vo=(OAViewObject)am.findViewObject("PatientEntryVO1"); Row row= vo.first();
row.setAttribute("xxReadOnly",Boolean.TRUE);
}

Rebuild the code and run the page and see the output, the below figure shows the search page output and
the second image shows the dynamically changed page which is actually the patient entry page:

General Page 196

Click on Detail Image icon in the search list:

General Page 197

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

Next Unit

General Page 198

- Moving OAF Project Files Into Apps Server


Friday, December 05, 2014
5:09 PM

Moving OAF Project Files Into Apps Server


This lesson shows how to move OAF project files into Apps Server, or OAF deployment, or Registering OAF
pages in to Oracle Applications.

Here we are going to see how to move the files into the APPS server.To move files from Desk top system to
Oracle Apps server we need to use third Party tools like Putty, WinScp, etc..
Here we are using both Putty and Winscp, and let us see how to register OAF page into Apps Server.
Step 1: Move all Class files or Java files to respective JAVA_TOP.
If we are moving Java files then we need to compile Java files explicitly in the server using the command

JAVAC <Java_file_name.java>
If we are moving Class files then the compilation is not required, i.e., instead of compilation we can move
class files directly.

Note: The best approach is to move java files into server and compile, so that server side compatibility will be
there.

In linux environment to know where exactly the JAVA_TOP is located type the following command in putty:
cd $JAVA_TOP
After changing the directory type the following command so that we will come to know the path location
where exactly the JAVA_TOP is located:
pwd (Present working Directory)

Example:
/u01/apps1/apps/apps_st/comn/java/classes

Step 2: After finding where exactly the Java top is located move the files into java top, let us see how to move
class files, here we are moving class files to the JAVA_TOP using the WinScp

The below image shows the moving process in WinScp.Drag the folder from left side and drop it on the
linux/unix environment:

General Page 199

Select the folder drag and drop it to the server environment, after that one popup window will come and
click on Copy button:

In the next lesson we are going to see Import script, and why we need import script.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 200

- Import Script in OAF


Friday, December 05, 2014
5:09 PM

Import Script in OAF


In this lesson we are going to see the import script in OAF and how to use import script in oaf.
The importance of OAF import script is for redirection of pages into MDS directory.

Let us consider in our project we have one OAF page with the following page link generated:
OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG

So for the above search page see the following import script which we need to perform in putty:
java oracle.jrad.tools.xml.importer.XMLImporter
$JAVA_TOP/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG.xml -username apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=www.newtonapples.com/old)
(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=vis)))" -rootdir $JAVA_TOP

The above import script is for linux/unix environment but few students might practice in Windows server
environment for them the following is the import script for window server environment:

import D:\Bharath\Softwares\p9879989_R12_GENERIC\jdevhome\jdev\myprojects\xxstirling\
oracle\apps\po\stirlingprj\webui\SearchPG.xml -rootdir ...(your win server apps rootdir)
..\jdevhome\jdev\myprojects -username apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=www.newtonapples.com/old)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=vis)))"

For each and every page we need to execute the import script in OAF, the below image shows import script
execution process i.e., after writing the import script the following is the confirmation it shows in putty:
Whenever the import script is executed successfully i.e., if the importing file is properly executed then it
shows a message called Import Completed.

In the next lesson we are going to see how to create function, creating menu, and attaching menu to
Responsibility.
Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 201

- Creating Function,Menu, and Responsibility in Apps


Friday, December 05, 2014
5:09 PM

Creating Function,Menu, and Responsibility in


Apps for OAF Pages
In this lesson we are going to see how to create a function,menu, and responsibility in Oracle Applications for
OAF pages.

Creating Function in Apps:


Select Application Developer or System Administrator to navigate to Function, The below image shows the
navigation in System Administrator.

After selection, then a Function window will get opens, give the Function Name and User Function Name

General Page 202

After that go to Properties tab and in that give Type as SSWA jsp function

After that go to Web Html tab and in that in HTML call give the address bar generated page path dont
give .xml extension.

General Page 203

Save it and then navigate to create Menu

Give Menu name and function Name, if we want to create Submenus then create one more menu add
function to that and design the menu structure according to the Oracle Applications guidance.

General Page 204

After that create one responsibility (optional) add menu to that responsibility, the below image shows the
responsibility navigation in System Administrator:

General Page 205

Give the values in Responsibility, for example see the below image:

General Page 206

After adding menu to the responsibility attach Responsibility to the User, Bounce the Server.
Clear the Cache using Functional Administrator which is Optional.
The below image shows the example navigation of the Responsibility which contains two sub menus under
one main menu.

General Page 207

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 208

- Extensions in OAF
Friday, December 05, 2014
5:10 PM

Extensions in OAF
In this lesson we will see the different types of extensions in OAF (Oracle Apps Framework). We use
extensions if we want to do any changes in the already shipped oracle E-Business suite. The main purpose we
use extensions is to make changes in the already well designed Oracle E-Business suite pages.
We have two types of extensions
1. BC4J Extensions
2. CO Extension
BC4J Extensions are again divided into three types and they are:

VO Extension
AM Extension
EO Extension
You can see in the further chapters how to create extensions in OAF and how the extensions will make
changes in OAF.
Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 209

- VO Extension in OAF
Friday, December 05, 2014
5:10 PM

VO Extension in OAF
In this lesson we are going to see how to extend the VO (View Object) in OAF (Oracle Applications
Framework).
Before going to extent the VO let us understand the requirement first. Navigate to the Purchasing, Vision
Operations (USA).

Purchasing, Vision Operations (USA) -> Supply Base -> Supplier User Management -> Supplier User
Creation -> Register Supplier User.

The same navigation process is shown in the below image:-

The below image shows the Register Supplier User OAF page which will appear once we select Register
Supplier User option as discussed.

General Page 210

When we click on the Supplier Name search option (LOV) in the above page we will see Supplier Name and
Supplier Number.

So therefore our task is to add Vendor Lookup Code additional column in the search list.
Using Customization we can add a column but we cannot carry data to that created column so therefore we
need to go for extension if we want to carry data along with Supplier Name and Supplier Number. Hence we
have to go for extension let us see how to extent and here the requirement is just to carry data and display it
so therefore we know that using VO we can achieve it and hence no need to perform any DML operation like
INSERT,UPDATE, DELETE.

Let us see the requirement step wise:

Step 1: Identify the VO from the page. It means first we need to identify which VO to be extend. Go to about
this page and expand the Business Component Reference Details. For reference look at the below image:

After that select VendorsVO as we know that supplier called as Vendors and their information stores in
PO_VENDORS table. According to the naming convention VO ends with VO after name we can identify.

General Page 211

Click on the VendorsVO so that we can see the query statement used for that VendorsVO, the below image
shows the query of vendorsVO which is used in Register Supplier User OAF page.

Step 2: Identify the page and copy or download it from Application Top.
Note that all the Pages and Regions will be there in Application Top and all the Controller (CO), Application
Module (AM), View Object (VO) will be there in Java Top.

We can identify the page when we click on about this page, we can find one path which contains page name.

The below image shows the page in Server Application Top, from that we need to copy the file.

General Page 212

From the above Application Top we need to copy the RegSuppUserPG.xml page, note that the path may be
different in your environment so check the path properly or concern the DBA for your required file to copy.
After copying the file move it to any existing project of OAF in desktop system for example see the below
image it was moved into the following location in Desktop.

Note that we need to paste the page in Webui of JDeveloper

After copying open the JDeveloper so that we can see the copied page if JDeveloper is already open then
refresh the JDeveloper so that the page will appear automatically. Select the page and we can see VO Name
in the page structure.
For reference look at the below image:-

General Page 213

Here in the above page structure we can identify that VO name is RegistrationVO but for Supplier Name we
can see that Oracle OAF standard page used External VO hence we need to carry the External VO too from
the server. The below image shows the finding process of External VO in the original page structure.

General Page 214

Now we can observe that the external LOV name is SupplierLOVRN, copy the SupplierLOVRN.xml file and
paste it in the same location where we pasted the Register Supplier page. Refresh the JDevelper so that we
can see the External LOV. Now in the external LOV we can identify the Exact VO which we need to extend to
achieve our requirement.
The below image shows the finding process of exact VO from the External VO.

Step 3: Now finally after finding the exact VO download the VO from the Java Top and create the directory
structure whatever the VO had in myProjects of desktop JDeveloper folder.
Note that the following image shows the pos directory in Apps server is copying to apps folder in Desktop
JDeveloper, here if we are copying from oracle on wards then the JDevelper will take heavy time for further
process, and hence we need to download only the required things from the Server.

General Page 215

The below image screenshot is of WinSCP tool.

The below is image shows after copying and creating the same directory structure it looks like the following.
N

Step 4: After creating the directory structure now create one dummy workspace and Project in JDeveloper
for VOExtension. And in the project creation process in step1 the default package name must be same as the
path which we found in About this page. But here we need to remove the slash (/) symbol and in that place
we have to keep dots (.), for reference have a look into the below image.

General Page 216

After creating project check that in applications oracle.apps.pos structure is available if you didnt find that
package then open the project properties, select Project Content.

Click on Add button and select the proper directory structure. Select it and click on Ok now check that the
Oracle.apps.pos package will appear.

General Page 217

Step 5:Copy the SQL Query from the VendorsVO and modify the Query in Toad or SQL Developer Tool or if
any other and save the query and keep it aside. In query add the column name vendor_type_lookup_code.
The modified SQL Query is shown below:
SELECT * FROM (Select vendor_id, vendor_name, segment1, vendor_type_lookup_code
from PO_VENDORS where enabled_flag = 'Y'
and ( START_DATE_ACTIVE is null OR START_DATE_ACTIVE &lt; SYSDATE )
and ( END_DATE_ACTIVE
is null OR END_DATE_ACTIVE &gt; SYSDATE )
and (vendor_type_lookup_code is null or vendor_type_lookup_code &lt;&gt; 'EMPLOYEE')) QRSLT
ORDER BY upper(vendor_name)

Step 6: Now create the New VO in custom directory. Extract the Package select Registration right click on it
and then select New View Object For reference look into the below image.

Some times while creating VO JDeveloper may show some dialogue box errors that required so and so file
not found in the package, we can ignore these kind of messages click on OK but we must be very cautious
about the missing files may be which are must required for our extension process.
The below image shows the package name specification process.

General Page 218

After that in the extends part click on the Browse button and then select the Original VO name that we can
find in the directory structure which we copied and created same as it is in the server.

The below sample image shows After selecting the Extends VO.

After clicking next to the query remove the existing SQL Query and place the modified SQL Query in which we
added a coloumn vendor_type_lookup_code and finish the VO creation process.
Step 7: Now we need to substitute the new VO with the existing VO for that select Tools -> Project
Properties, for reference look into the below image.
Extract the Business Components, select Substitutions and then Select the proper VO from the available list
and in Substitute list, for example as shown in the below image:

General Page 219

After adding into the project properties now we need to move the project folder from MyClasses to the
server environment Classes Directory. Be cautious while moving the files from desktop to the server. Here no
need to replace the existing files at all for the first time.
The below figure shows the moving process from the desktop to the server.

After that run the jpxImport script, the below one is the sample JPXImport script.
java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxvoextension/VOExtensionPrj.jpx -username apps password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host
=www.newtonapples.com/old)(port = 1521))) (connect_data = (service_name = naora1)))"

After successfully running import script, now go to Functional Administrator, click on Core Service Tab and
then select Caching Framwork -> Click on Clear All Cache button. We can even click on Clear All Statistics
button if we want.

The below image shows the functional administrator page.

General Page 220

After that check whether the Extended VO is available or not in the About this page once the extended VO
appears then now click on the LOV option of Supplier Name.

Click on Personalize Supplier Table.


After clicking on it create one item and select level as site and item type as Message Styled Text. We need to
create one item because we modified VO and we added column to the VO but we not yet displayed it in OAF
page so to display it in OAF page we need to create one item.
Here in View Instance we need to give the old VO name rather than the new VO name. For view attribute
give the attribute name which is generated when we click on the Next button after modifying VO we will find
the attribute name for Vendor_type_lookup_code that name we need to give here.

Save the newly created item and now again click on the Supplier name so there fore here we go and we can
find the Vendor Lookup Code which we created.

General Page 221

So therefore finally we finished the VO Extension process in OAF.

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

Time Remaining : UNLIMITED ACCESS


0%
Chapter1: Introduction

What is OAF ?

Difference Between OAF and Oracle Forms

Structure of OAF

Onion Structure of OAF

Difference Between OAF and Oracle Forms

Advantages and Disadvantages of OAF

Chapter2: MVC Architecture

About Model

Entity Objects and Entity Association

View Objects and View Links

General Page 222

Application Module

About View

About Controller

BC4J File Structure

Chapter 3: JDeveloper Configuration

Identifying JDdeveloper Version

Installation Process of JDeveloper

JDeveloper Configuration Steps

Chapter 4: Creating First Page

Welcome (or) Sample Page Creation

Displaying Images on Page

Creating Items and Regions In a Page

How to display User Name, User Id and Responsibility in OAF

Chapter 5: Regions In JDeveloper

Message Component Layout Region

Header Region

Row Layout Region

Default Double Column

Default Single Column

Page Button Bar

Query Region

Chapter 6: Items In JDeveloper

Message Text Input

Message Styled Text

Message Check Box

Message Radio Button

Message Choice

Submit Button

Message Rich Text Editor

Image Item

Chapter 7: Sample Exercises

Displaying Exception Messages Based on Condition

Swapping The Value From One Field to Another Field

Displaying Data From Data Base

Data Entry Page in OAF

Calling One Form to Another Form

General Page 223

SPEL in OAF

Chapter 8: Search Pages In OAF

Search Pages

Automatic Search Inline LOV

Automatic Search External LOV

Result Base Search

Manual Search

Chapter 9: Sample Project Work

MD-50 of Sample Project in OAF

Creating First OAF Page In Project

Creating Search Page

Creating Update Page

Calling OAF Pages Using Update and Detail Image Icons

Final Code in AM, Update Page, and Patient Entry Page Controller

Dynamic Changes in OAF pages

Chapter 10: Deploying OAF Pages Into Oracle Apps

Moving OAF Project Files Into Apps Server

Import Script in OAF

Creating Function,Menu, and Responsibility in Apps for OAF Pages

Chapter 11: Extensions and Personalizations

Extensions in OAF

VO Extension in OAF

AM Extension in OAF

CO Extension in OAF

EO Extension in OAF

Personalization in OAF

BACK TO COURSE
top

NewtonApples Teracare Software Pvt. Ltd. All rights reserved.

Home

About Us
Services

Courses
Course

Contact Us

UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>

General Page 224

- AM Extension in OAF
Friday, December 05, 2014
5:11 PM

AM Extension in OAF
This OAF tutorial lesson will explain how to extend AM (Application Module) in OAF using one sample
exercise, so that we will get knowledge in OAF AM Extension.
First of all let us understand the requirement. We have one Responsibility called OA Framework ToolBox
Tutorial Labs. If you dont have that Responsibility go to System Administrator Responsibility -> User and
add the Responsibility. The application for the OA Framework ToolBox Tutorial Labs is Common Modules AK.
In the responsibility navigate to Main Employee Search.
OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search

nbsp;
The below image shows the same Navigation Process:

After navigating to the Main Employee Search page we have a button called Create Employee. Whenever we
click on Create Employee Button it will take us to another page for creating employee.

General Page 225

After creating employee here obviously we will click on Apply button to add employee details but whenever
we click on Apply button we are creating employee that is fine and hence there is no Table to track which
user created particular Employee.
So therefore here our requirement is to maintain the track Record of User Information, for Example if we
logged in with user name as Operations then after creating Employee we need to maintain such information
like User Operations created so and so employee.

Let us see the AM extension part step wise:Step 1: Create one Custom table. Note that the following custom table is not required to register in Oracle
Apps because we are not using any KFF(Key Flex Fields) or DFF(Descriptive Flex Fields) in table.
CREATE TABLE XX_USER(user_id VARCHAR2(40),
user_name VARCHAR2(40),
last_update_login NUMBER,
last_updated_by NUMBER,
last_updated_date DATE,
creation_date DATE,
created_by NUMBER)

Step 2: Identify the AM from the page. That means we need to identify the AM which we want to extend. For
that go to About This page and then extract Business Component Reference Details.

Here we can identify our AM as EmployeeAM.

General Page 226

Step 3: Download the AM from the Java_Top and create the directory structure in OAF patch on our desktop
system and paste it in MyProjects.
The below image shows the directory structure after creating in the desktop system. Note that copying the
entire directory structure may take long time and also it may reduce the JDeveloper Performance so
therefore be cautious while creating directory structure and moving the files from Java_Top to the the
MyProjects folder in JDeveloper.

Step 4: After copying AM and Creating Directory Structure create new Workspace and Project in Directory
Structure for extending AM.
Note that in project give the package name same which we found in AboutThisPage.

General Page 227

From the above package now we can give the package for project as follows:
xxamextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui

The below image shows the sample project name and Default package name.

Step 5: After creating WorkSpace and project create one dummy page so that dummy structure will be
created.
After creating Dummy Structure and Page now create one New Application Module (AM) in Custom
Directory. Right click on the labsolutions and select New Application Module The below image shows the
reference of how to create New AM in custom Directory.

General Page 228

While creating AM in Extends select the Original AM which we copied from Server. The copied AM must be in
the created directory structure in our desktop JDeveloper Patch.

Step 6: After creating AM now open the AM java file and modify the code, add the following code in the AM
Java file.
public class AMExtensionAMImpl extends EmployeeAMImpl
{
/**This is the default constructor (do not remove)
*/
public AMExtensionAMImpl()
{
}
/**Sample main for debugging Business Components code using the tester.
*/
public void apply()
{
java.sql.Date sdate= getOADBTransaction().getCurrentDBDate().dateValue();

General Page 229

java.sql.Date sdate= getOADBTransaction().getCurrentDBDate().dateValue();


try
{
String query= "INSERT INTO XX_USER VALUES(:1,:2,:3,:4,:5,:6,:7)";
PreparedStatement ps= getOADBTransaction().getJdbcConnection().prepareStatement(query);
ps.setInt(1,getOADBTransaction().getUserId());
ps.setString(2,getOADBTransaction().getUserName());
ps.setInt(3,getOADBTransaction().getUserId());
ps.setInt(4,getOADBTransaction().getUserId());
ps.setDate(5,sdate);
ps.setDate(6,sdate);
ps.setInt(7,getOADBTransaction().getUserId());
ps.execute();
}
catch (Exception e)
{
e.printStackTrace();
}
super.apply();
}
public static void main(String[] args)
{
launchTester("xxamextension.oracle.apps.fnd.framework.toolbox.labsolutions", /* package name */
"AMExtensionAMLocal" /* Configuration Name */);
}
}

Rebuild the code and check the code rebuild is successful without any errors.
Step 7: After successful compilation goto Project Properties and substitute the New AM with the old AM.
Go to Tools -> Project Properties

Find the AM in Available and Substitute list.

General Page 230

Select the EmployeeAM from the list and then click on Add button later click on Ok button.

General Page 231

After adding Old and New AM now rebuild the Code and Rebuild the entire project.
Step 8: Move the Project file from MyClasses folder in Desktop JDeveloper patch file To the server $Java_Top
directory. The below image shows the sample scenario of moving the project file folder from Desktop to
server java top.

After moving the project folder move the jpx generated file. Before moving the jpx file open the jpx file with
notepad and check whether the substitution section is there or not, make sure the substitution section must
exist.

General Page 232

exist.
The below image shows the moving process of jpx file from desktop to server. The jpx file is available in
MyProjects folder of JDeveloper patch.

Step 9: After moving the files run the import script. The below is the sample import script for AM extension,
it is actually the jpx import script for AM extension.
java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxamextension/AMExtensionOne.jpx -username apps password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host
= www.newtonapples.com/old)(port = 1521))) (connect_data = (service_name = newton)))"

Step 10: Clear the Cache in Functional Administrator or bounce the server.
Once after bouncing the server we can see the AM which we created. The below image shows the AM name
which we can find in About This Page.

Step 11: Now create new employee in OAF Page using the Crate Employee Button. After adding employee
details click on Apply button.

After creating Employee now check in the Custom Created table we can find the information about the user
who created the Employee. For example who created Bharath user.
Here I logged in with default Opertaions user.

General Page 233

SELECT * FROM XX_USER;

Now we can see the information of users who created the Employees.

Have Questions ? Ask in the Unit Forums

Previous Unit

Mark this Unit Complete


Next Unit

General Page 234

- CO Extension in OAF
Friday, December 05, 2014
5:11 PM

CO Extension in OAF
In this lesson we are going to see how to extend CO (Controller) in OAF. Before that let us see the
requirement. Go to the following navigation.
Purchasing, Vision Operations -> Supply Base ->Supplier User Management ->Supplier User Creation ->
Invite Supplier User.

For reference lets have a look into the below image:-

After selecting the Invite Supplier User we will see OAF page. The same page part is shown in the below
image.

General Page 235

If you observe in the above image User Information is highlighted which contains Email Address and Note.
Here our requirement to add User Name field into the User Information. It means if we logged in with
Operations user then that User Name must display in User Information.
If you observe, according to the requirement, we need to display the User Name when the page is loaded. It
means we need to write the code in the processRequest of Controller class.

Let us see the CO extension process step wise:Step 1: First to display the user name we need to create one item, so therefore create one item for that
Select Personalize User Information in OAF page.
After that select create Item image as shown in the below image:

For item in the properties:Level : Site


Item Style : Message Text Input
ID
: UserName
Prompt : User Name

General Page 236

Prompt

: User Name

Step 2: Finding the Controller to extend. Before extending CO we need to find out which Controller we need
to extend. This step explains how to find the main CO in page.
Go to About This Page, Expand all. After expanding all we can see the controller name in Controller column
in the same row where the page name contains.
For example in our requirement the page name is Invite a Supplier User, so in that row InvitationCO is added.
It means Invitation CO is the main Controller.
The below image shows two controllers, but if you observe InvitationCO is the main Controller because which
is attached to the main page region.

General Page 237

So therefore finally we came to know that InvitationCO is the Controller which we need to extend.

Step 3: Download the Controller from the $Java_Top and create the directory structure in JDeveloper Patch
file in our desktop system.
Note that it is not necessary that we need to download entire files in the structure. Copying the whole files in
the structure may take long time for copying and also most of the times it impact on JDeveloper
performance.
The below sample image shows the copying and creating directory structure process, which shows actually
what exact files are copying from the server.

General Page 238

Step 4: Open the JDeveloper and Create the Dummy work space.

Note that while in Project Wizard you must give the same package name which you will find in about this
page. For example see the below image.

After finishing project, create the dummy page for structure.

General Page 239

Step 5: In this step you need to create one new controller. Normally we will create controller on page, just by
right clicking on the page region we will select Set New Controller option, but here in Controller extension it
is not like that. Lets see how to set controller in CO Extension.
In Application Navigator, Right click on webui and select New Option.

In Categories extract General and then select Simple Files. Select JavaClass in Items. The below image shows
the Java Class Selection process.

In Extends click on the Browse button and select Original CO (InvitationCO). This Original CO will be available
because we copied the CO and created the same directory structure in JDeveloper patch.

General Page 240

So therefore finally after giving Name, Package, and Extends click on OK button.

Step 6: In this step go to the controller java file, create the processRequest method same as it is in seeded.
After creating method write the java code to display the User Name. The below is the java code that you
need to type. Note that copying the below code and pasting it in your JDeveloper is fine, but check the
import files properly.
package xxcoextension.oracle.apps.pos.registration.webui;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.pos.registration.webui.InvitationCO;
public class InvitationCOEx extends InvitationCO
{
public InvitationCOEx()
{
}
public void processRequest(OAPageContext pageContext, OAWebBean webBean)

General Page 241

public void processRequest(OAPageContext pageContext, OAWebBean webBean)


{
super.processRequest(pageContext, webBean);
String UName = pageContext.getUserName();
OAMessageTextInputBean mst =(OAMessageTextInputBean)webBean.findChildRecursive("UserName");
mst.setValue(pageContext,UName);
}
}

Step 7: Copy the project folder and paste it in $Java_Top, Classes directory (folder) of server. The below
image shows the sample process of moving the files from the desktop to the server.

Step 8: Login to the Application and click on About This Page, now we can see the Extended CO name
which is replaced with the Earlier Seeded Name.

Here Like VO and AM extension no need to run the Import script. But to activate the CO you must follow the
below step wise process.
First step, select Personalize Page option and then select Personalize button, for example see the below
image.

General Page 242

In step two, at site level give the package name. Here you must be careful while creating package name. See
the directory structure where actually the class file contains.

For example our class file is located in the following directory structure.
xxcoextension/oracle/apps/pos/registration/webui/InvitationCOEx.class

Now replace the slash (/) with the dots and remove .class, for example see the below one:
xxcoextension.oracle.apps.pos.registration.webui.InvitationCOEx

Finally the controller path is ready and that we need to give in site level (site level is an example we are
taking here, you can take any other level too if required to restrict).

The below image shows the example, where actually the controller class path is given.

General Page 243

Now finally you can see that after extending CO we are able to see the User Name, whenever the page got
loaded. For example see the below image:

Have Questions ? Ask in the Unit Forums

General Page 244

Previous Unit
Mark this Unit Complete
Next Unit

General Page 245

- EO Extension in OAF
Friday, December 05, 2014
5:12 PM

EO Extension in OAF
This OAF online tutorial lesson explains how to Extend Entity Object in Oracle Apps Framework (OAF) with
one sample requirement, taking it as an example to explain EO Extension Process in OAF.
First of all let us understand the requirement. We have one Responsibility called OA Framework ToolBox
Tutorial Labs. If you dont have that Responsibility go to System Administrator Responsibility -> User and
add the Responsibility. The application for the OA Framework ToolBox Tutorial Labs is Common ModulesAK.
In the responsibility navigate to Main Employee Search.
OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search

The below image shows the same Navigation Process:

After navigating to the Main Employee Search page we have a button called Create Employee. Whenever we
click on Create Employee Button it will take us to another page for creating employee.

General Page 246

The below image shows the Create Employee OAF page window, in the below image you can see that Email
Address is highlighted. Lets see the explanation after the image why its highlighted.

In the above image you might have observed that Email Address field is empty. So therefore here our
requirement is we want the default email address as training@newtonapples.com/old.
Hence Email Address field is an attribute in OAF, we need to add default value to the attribute. This can be
done by extending EO where it contains all the attribute values. We can perform DML operations (INSERT,
UPDATE, DELETE) only using EO. Here we need to set the default value of Email Address to
training@newtonapples.com/old. Let us see how to extend EO step wise.

Step 1: Go to About this Page of Create Employee page. Extract the Business Component Reference Details.
You can see the EmployeeEO.
Copy the EmployeeEO and create the same directory structure in JDeveloper patch, which is available in your
desktop system.
The below image shows the sample way of creating the directory structure and copying the files from the
Server to the JDeveloper patch.

General Page 247

Step 2: Open the JDeveloper and create new WorkSpace and Project.
For example:Workspace Name : XXEOExtension
Project Name : XXEOExtensionPRJ
Default Package: xxeoextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui

Note that we need to create the Default package name according to the path which we will see in about this
page, we have a page path like as follows:/oracle/apps/fnd/framework/toolbox/labsolutions/webui/EmployeePG 120.9

We need to replace the Default package name according to the patch as follows:xxeoextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui

If you observe, we removed slash symbols, and also we removed the page name and at the beginning we
have to give our own name like xxeoextension.

Step 3: After creating the dummy workspace and Dummy project, we will get a structure. Now create the
Entity Object.
For example give the Entity name as follows:
Name : EmployeeEOEx
Package : xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server

In Extends Entity, select the Original EmployeeEO which you will find in browse because we created the same
directory structure as it is in server and also we copied from the server.
The below image shows the EO creation process Window

General Page 248

After that whenever you click on Next button, you will not find any Entity Attributes:

To see the Attributes, click on the button called New From Table.., Using right arrow buttons move all the
available Attributes into the selected list.

General Page 249

After that in fourth step of EO creation process, check the Validation Method check box. The same scenario is
shown in the below image:

Step 4: After creating EO open the Java File and add the two lines in create method. In the below code you
need to add only two lines, line numbers 40 and 41. No need to do any changes for the remaining entire
code.
package xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server;
import oracle.apps.fnd.framework.server.OAEntityDefImpl;
import oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEOImpl;
import oracle.jbo.AttributeList;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.domain.RowID;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityDefImpl;
// --------------------------------------------------------------------// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
// --------------------------------------------------------------------public class EmployeeEOExImpl extends EmployeeEOImpl
{
public static final int MAXATTRCONST =
EntityDefImpl.getMaxAttrConst("oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEO");
public static final int ROWID = MAXATTRCONST;
private static OAEntityDefImpl mDefinitionObject;
/**This is the default constructor (do not remove)
*/
public EmployeeEOExImpl()

General Page 250

public EmployeeEOExImpl()
{
}
/**Retrieves the definition object for this instance class.
*/
public static synchronized EntityDefImpl getDefinitionObject()
{
if (mDefinitionObject == null)
{
mDefinitionObject =
(OAEntityDefImpl)
EntityDefImpl.findDefObject("xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEOEx");
}
return mDefinitionObject;
}
/**Add attribute defaulting logic in this method.
*/
public void create(AttributeList attributeList)
{
super.create(attributeList);
setEmailAddress("training@newtonapples.com/old");
}
/**Add Entity validation code in this method.
*/
protected void validateEntity()
{
super.validateEntity();
}
/**Gets the attribute value for EmployeeId, using the alias name EmployeeId
*/
public Number getEmployeeId()
{
return super.getEmployeeId();
}
/**Sets <code>value</code> as the attribute value for EmployeeId
*/
public void setEmployeeId(Number value)
{
super.setEmployeeId(value);
}
/**Gets the attribute value for Title, using the alias name Title
*/
public String getTitle()
{
return super.getTitle();
}
/**Sets <code>value</code> as the attribute value for Title
*/
public void setTitle(String value)
{
super.setTitle(value);
}
/**Gets the attribute value for FirstName, using the alias name FirstName
*/
public String getFirstName()
{
return super.getFirstName();
}
/**Sets <code>value</code> as the attribute value for FirstName
*/
public void setFirstName(String value)
{
super.setFirstName(value);
}
/**Gets the attribute value for MiddleNames, using the alias name MiddleNames
*/
public String getMiddleNames()
{
return super.getMiddleNames();
}
/**Sets <code>value</code> as the attribute value for MiddleNames
*/
public void setMiddleNames(String value)
{
super.setMiddleNames(value);
}
/**Gets the attribute value for LastName, using the alias name LastName
*/
public String getLastName()
{
return super.getLastName();
}
/**Sets <code>value</code> as the attribute value for LastName
*/
public void setLastName(String value)
{
super.setLastName(value);
}
/**Gets the attribute value for FullName, using the alias name FullName
*/
public String getFullName()
{
return super.getFullName();
}
/**Sets <code>value</code> as the attribute value for FullName

General Page 251

/**Sets <code>value</code> as the attribute value for FullName


*/
public void setFullName(String value)
{
super.setFullName(value);
}
/**Gets the attribute value for EmailAddress, using the alias name EmailAddress
*/
public String getEmailAddress()
{
return super.getEmailAddress();
}
/**Sets <code>value</code> as the attribute value for EmailAddress
*/
public void setEmailAddress(String value)
{
super.setEmailAddress(value);
}
/**Gets the attribute value for ManagerId, using the alias name ManagerId
*/
public Number getManagerId()
{
return super.getManagerId();
}
/**Sets <code>value</code> as the attribute value for ManagerId
*/
public void setManagerId(Number value)
{
super.setManagerId(value);
}
/**Gets the attribute value for PositionCode, using the alias name PositionCode
*/
public String getPositionCode()
{
return super.getPositionCode();
}
/**Sets <code>value</code> as the attribute value for PositionCode
*/
public void setPositionCode(String value)
{
super.setPositionCode(value);
}
/**Gets the attribute value for Salary, using the alias name Salary
*/
public Number getSalary()
{
return super.getSalary();
}
/**Sets <code>value</code> as the attribute value for Salary
*/
public void setSalary(Number value)
{
super.setSalary(value);
}
/**Gets the attribute value for StartDate, using the alias name StartDate
*/
public Date getStartDate()
{
return super.getStartDate();
}
/**Sets <code>value</code> as the attribute value for StartDate
*/
public void setStartDate(Date value)
{
super.setStartDate(value);
}
/**Gets the attribute value for EndDate, using the alias name EndDate
*/
public Date getEndDate()
{
return super.getEndDate();
}
/**Sets <code>value</code> as the attribute value for EndDate
*/
public void setEndDate(Date value)
{
super.setEndDate(value);
}
/**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
*/
public Date getLastUpdateDate()
{
return super.getLastUpdateDate();
}
/**Sets <code>value</code> as the attribute value for LastUpdateDate
*/
public void setLastUpdateDate(Date value)
{
super.setLastUpdateDate(value);
}
/**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
*/
public Number getLastUpdatedBy()
{
return super.getLastUpdatedBy();

General Page 252

return super.getLastUpdatedBy();
}
/**Sets <code>value</code> as the attribute value for LastUpdatedBy
*/
public void setLastUpdatedBy(Number value)
{
super.setLastUpdatedBy(value);
}
/**Gets the attribute value for CreationDate, using the alias name CreationDate
*/
public Date getCreationDate()
{
return super.getCreationDate();
}
/**Sets <code>value</code> as the attribute value for CreationDate
*/
public void setCreationDate(Date value)
{
super.setCreationDate(value);
}
/**Gets the attribute value for CreatedBy, using the alias name CreatedBy
*/
public Number getCreatedBy()
{
return super.getCreatedBy();
}
/**Sets <code>value</code> as the attribute value for CreatedBy
*/
public void setCreatedBy(Number value)
{
super.setCreatedBy(value);
}
/**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
*/
public Number getLastUpdateLogin()
{
return super.getLastUpdateLogin();
}
/**Sets <code>value</code> as the attribute value for LastUpdateLogin
*/
public void setLastUpdateLogin(Number value)
{
super.setLastUpdateLogin(value);
}
/**Gets the attribute value for AttributeCategory, using the alias name AttributeCategory
*/
public String getAttributeCategory()
{
return super.getAttributeCategory();
}
/**Sets <code>value</code> as the attribute value for AttributeCategory
*/
public void setAttributeCategory(String value)
{
super.setAttributeCategory(value);
}
/**Gets the attribute value for Attribute1, using the alias name Attribute1
*/
public String getAttribute1()
{
return super.getAttribute1();
}
/**Sets <code>value</code> as the attribute value for Attribute1
*/
public void setAttribute1(String value)
{
super.setAttribute1(value);
}
/**Gets the attribute value for Attribute2, using the alias name Attribute2
*/
public String getAttribute2()
{
return super.getAttribute2();
}
/**Sets <code>value</code> as the attribute value for Attribute2
*/
public void setAttribute2(String value)
{
super.setAttribute2(value);
}
/**Gets the attribute value for Attribute3, using the alias name Attribute3
*/
public String getAttribute3()
{
return super.getAttribute3();
}
/**Sets <code>value</code> as the attribute value for Attribute3
*/
public void setAttribute3(String value)
{
super.setAttribute3(value);
}
/**Gets the attribute value for Attribute4, using the alias name Attribute4
*/
public String getAttribute4()

General Page 253

public String getAttribute4()


{
return super.getAttribute4();
}
/**Sets <code>value</code> as the attribute value for Attribute4
*/
public void setAttribute4(String value)
{
super.setAttribute4(value);
}
/**Gets the attribute value for Attribute5, using the alias name Attribute5
*/
public String getAttribute5()
{
return super.getAttribute5();
}
/**Sets <code>value</code> as the attribute value for Attribute5
*/
public void setAttribute5(String value)
{
super.setAttribute5(value);
}
/**Gets the attribute value for Attribute6, using the alias name Attribute6
*/
public String getAttribute6()
{
return super.getAttribute6();
}
/**Sets <code>value</code> as the attribute value for Attribute6
*/
public void setAttribute6(String value)
{
super.setAttribute6(value);
}
/**Gets the attribute value for Attribute7, using the alias name Attribute7
*/
public String getAttribute7()
{
return super.getAttribute7();
}
/**Sets <code>value</code> as the attribute value for Attribute7
*/
public void setAttribute7(String value)
{
super.setAttribute7(value);
}
/**Gets the attribute value for Attribute8, using the alias name Attribute8
*/
public String getAttribute8()
{
return super.getAttribute8();
}
/**Sets <code>value</code> as the attribute value for Attribute8
*/
public void setAttribute8(String value)
{
super.setAttribute8(value);
}
/**Gets the attribute value for Attribute9, using the alias name Attribute9
*/
public String getAttribute9()
{
return super.getAttribute9();
}
/**Sets <code>value</code> as the attribute value for Attribute9
*/
public void setAttribute9(String value)
{
super.setAttribute9(value);
}
/**Gets the attribute value for Attribute10, using the alias name Attribute10
*/
public String getAttribute10()
{
return super.getAttribute10();
}
/**Sets <code>value</code> as the attribute value for Attribute10
*/
public void setAttribute10(String value)
{
super.setAttribute10(value);
}
/**Gets the attribute value for Attribute11, using the alias name Attribute11
*/
public String getAttribute11()
{
return super.getAttribute11();
}
/**Sets <code>value</code> as the attribute value for Attribute11
*/
public void setAttribute11(String value)
{
super.setAttribute11(value);
}
/**Gets the attribute value for Attribute12, using the alias name Attribute12

General Page 254

/**Gets the attribute value for Attribute12, using the alias name Attribute12
*/
public String getAttribute12()
{
return super.getAttribute12();
}
/**Sets <code>value</code> as the attribute value for Attribute12
*/
public void setAttribute12(String value)
{
super.setAttribute12(value);
}
/**Gets the attribute value for Attribute13, using the alias name Attribute13
*/
public String getAttribute13()
{
return super.getAttribute13();
}
/**Sets <code>value</code> as the attribute value for Attribute13
*/
public void setAttribute13(String value)
{
super.setAttribute13(value);
}
/**Gets the attribute value for Attribute14, using the alias name Attribute14
*/
public String getAttribute14()
{
return super.getAttribute14();
}
/**Sets <code>value</code> as the attribute value for Attribute14
*/
public void setAttribute14(String value)
{
super.setAttribute14(value);
}
/**Gets the attribute value for Attribute15, using the alias name Attribute15
*/
public String getAttribute15()
{
return super.getAttribute15();
}
/**Sets <code>value</code> as the attribute value for Attribute15
*/
public void setAttribute15(String value)
{
super.setAttribute15(value);
}
/**Gets the attribute value for RowID, using the alias name RowID
*/
public RowID getRowID()
{
return (RowID)getAttributeInternal(ROWID);
}
/**getAttrInvokeAccessor: generated method. Do not modify.
*/
protected Object getAttrInvokeAccessor(int index,
AttributeDefImpl attrDef) throws Exception
{
if (index == ATTRIBUTE1)
{
return getAttribute1();
}
if (index == ATTRIBUTE10)
{
return getAttribute10();
}
if (index == ATTRIBUTE11)
{
return getAttribute11();
}
if (index == ATTRIBUTE12)
{
return getAttribute12();
}
if (index == ATTRIBUTE13)
{
return getAttribute13();
}
if (index == ATTRIBUTE14)
{
return getAttribute14();
}
if (index == ATTRIBUTE15)
{
return getAttribute15();
}
if (index == ATTRIBUTE2)
{
return getAttribute2();
}
if (index == ATTRIBUTE3)
{
return getAttribute3();
}

General Page 255

}
if (index == ATTRIBUTE4)
{
return getAttribute4();
}
if (index == ATTRIBUTE5)
{
return getAttribute5();
}
if (index == ATTRIBUTE6)
{
return getAttribute6();
}
if (index == ATTRIBUTE7)
{
return getAttribute7();
}
if (index == ATTRIBUTE8)
{
return getAttribute8();
}
if (index == ATTRIBUTE9)
{
return getAttribute9();
}
if (index == ATTRIBUTECATEGORY)
{
return getAttributeCategory();
}
if (index == CREATEDBY)
{
return getCreatedBy();
}
if (index == CREATIONDATE)
{
return getCreationDate();
}
if (index == EMAILADDRESS)
{
return getEmailAddress();
}
if (index == EMPLOYEEID)
{
return getEmployeeId();
}
if (index == ENDDATE)
{
return getEndDate();
}
if (index == FIRSTNAME)
{
return getFirstName();
}
if (index == FULLNAME)
{
return getFullName();
}
if (index == LASTNAME)
{
return getLastName();
}
if (index == LASTUPDATEDBY)
{
return getLastUpdatedBy();
}
if (index == LASTUPDATEDATE)
{
return getLastUpdateDate();
}
if (index == LASTUPDATELOGIN)
{
return getLastUpdateLogin();
}
if (index == MANAGERID)
{
return getManagerId();
}
if (index == MIDDLENAMES)
{
return getMiddleNames();
}
if (index == POSITIONCODE)
{
return getPositionCode();
}
if (index == ROWID)
{
return getRowID();
}
if (index == SALARY)
{
return getSalary();
}
if (index == STARTDATE)
{

General Page 256

{
return getStartDate();
}
if (index == TITLE)
{
return getTitle();
}
return super.getAttrInvokeAccessor(index, attrDef);
}
/**setAttrInvokeAccessor: generated method. Do not modify.
*/
protected void setAttrInvokeAccessor(int index, Object value,
AttributeDefImpl attrDef) throws Exception
{
if (index == ATTRIBUTE1)
{
setAttribute1((String)value);
return;
}
if (index == ATTRIBUTE10)
{
setAttribute10((String)value);
return;
}
if (index == ATTRIBUTE11)
{
setAttribute11((String)value);
return;
}
if (index == ATTRIBUTE12)
{
setAttribute12((String)value);
return;
}
if (index == ATTRIBUTE13)
{
setAttribute13((String)value);
return;
}
if (index == ATTRIBUTE14)
{
setAttribute14((String)value);
return;
}
if (index == ATTRIBUTE15)
{
setAttribute15((String)value);
return;
}
if (index == ATTRIBUTE2)
{
setAttribute2((String)value);
return;
}
if (index == ATTRIBUTE3)
{
setAttribute3((String)value);
return;
}
if (index == ATTRIBUTE4)
{
setAttribute4((String)value);
return;
}
if (index == ATTRIBUTE5)
{
setAttribute5((String)value);
return;
}
if (index == ATTRIBUTE6)
{
setAttribute6((String)value);
return;
}
if (index == ATTRIBUTE7)
{
setAttribute7((String)value);
return;
}
if (index == ATTRIBUTE8)
{
setAttribute8((String)value);
return;
}
if (index == ATTRIBUTE9)
{
setAttribute9((String)value);
return;
}
if (index == ATTRIBUTECATEGORY)
{
setAttributeCategory((String)value);
return;
}
if (index == CREATEDBY)

General Page 257

if (index == CREATEDBY)
{
setCreatedBy((Number)value);
return;
}
if (index == CREATIONDATE)
{
setCreationDate((Date)value);
return;
}
if (index == EMAILADDRESS)
{
setEmailAddress((String)value);
return;
}
if (index == EMPLOYEEID)
{
setEmployeeId((Number)value);
return;
}
if (index == ENDDATE)
{
setEndDate((Date)value);
return;
}
if (index == FIRSTNAME)
{
setFirstName((String)value);
return;
}
if (index == FULLNAME)
{
setFullName((String)value);
return;
}
if (index == LASTNAME)
{
setLastName((String)value);
return;
}
if (index == LASTUPDATEDBY)
{
setLastUpdatedBy((Number)value);
return;
}
if (index == LASTUPDATEDATE)
{
setLastUpdateDate((Date)value);
return;
}
if (index == LASTUPDATELOGIN)
{
setLastUpdateLogin((Number)value);
return;
}
if (index == MANAGERID)
{
setManagerId((Number)value);
return;
}
if (index == MIDDLENAMES)
{
setMiddleNames((String)value);
return;
}
if (index == POSITIONCODE)
{
setPositionCode((String)value);
return;
}
if (index == SALARY)
{
setSalary((Number)value);
return;
}
if (index == STARTDATE)
{
setStartDate((Date)value);
return;
}
if (index == TITLE)
{
setTitle((String)value);
return;
}
super.setAttrInvokeAccessor(index, value, attrDef);
return;
}
}

Step 5: Rebuild the code, after successfully rebuilding the code goto, Tools -> Project Properties. Extract
Business Components and then select Substitutions. Substitute Old and New Entity Objects, for example see
the below image:

General Page 258

Rebuild the code and then rebuild the entire project.

Step 6: Move the project file into the server.


Go to MyClasses folder in JDeveloper patch move the XXEOExtensionPRJ file into the server Java top.
After moving the project file, note that we need to move even JPX file, generally JPX file for the project is
available in the same folder.
For example move the JPX file from the MyClasses folder to the EOExtensionPRJ directory in server.
After moving the project file and jpx files, run the import script.
java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxeoextension/XXEOExtensionPRJ.jpx -username apps password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host
= www.newtonapples.com/old)(port = 1521)))(connect_data = (service_name = newton)))"

Step 7: Bounce the server or clear the Cache in Function Administrator responsibility. Sometimes even if you
clear cache it will not workout. So therefore, if that the case then you must bounce the server.
Finally select the Create Employee button, so that you can see for the Email Address the default value as
training@newtonapples.com/old.
You can see the changed Entity Object name in About This Page.

The below image shows the sample output.

General Page 259

Finally we finished sample EO Extension process in OAF.


Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete
Next Unit

General Page 260

-Personalization in OAF
Friday, December 05, 2014
5:13 PM

Personalization in OAF
In this lesson you are going to see few Personalizations in OAF. Before that what is personalization in OAF,
making changes without touching the code, or without extending any form,is called Personalization in OAF.
Let us navigate to the Responsibility called OA Framework ToolBox Tutorial Labs. In the responsibility
navigate to Main Employee Search.

OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search
All the changes here made at site level, so that changes will effect to the entire users whoever using.

Let us see the OAF Personalizations requirement wise.


Requirement 1: Before going to know about our first requirement lets have a look into the Main Employee
Search page.

You might have observed in the above image that Employee Name in Search Region is highlighted. Now the
requirement is to change the Employee Name to Search Employee Name.
Lets see how you can change the name using Personalization.
First click on Personalize Search link in the page. After clicking on Personalize Search page, in the
Personalization Structure click on Personalize image. For example see the below image:

After selecting Personalize image, in Prompt at site level give the required name Search Employee Name. For
example, see the below image:.

General Page 261

Click on Apply button after making changes, and see the output navigating to main page.

Requirement 2: In the second requirement you are going to see how to change the corporate branding
image. Note that all the images are available in the OA_MEDIA. Navigate to OA_MEDIA, for example open the
Putty and type the following command:
--change the directory using the following command

cd $OA_MEDIA
-- after changing the directory type the present working directory and copy the path, move the image files to that
particular location.

pwd
--- the below one is the example directory location where the image files contains
/u01/apps1/apps/apps_st/comn/java/classes/oracle/apps/media

So therefore hence before you changing the Corporate Branding Image, image must exist in OA_MEDIA
directory.
Click on Personalize Page at Header Level, after that in Personalization Structure select Personalize icon of
Image: (CorporateBranding). For example see the below image:

After clicking on Personalize image, now go to Image URI at site level change it to your branding image name.
For example, /OA_MEDIA/NA_LOGO.png. The below image shows the same scenario:

General Page 262

Click on Apply button, navigate to main page and see the changed Corporate Branding Image.

Requirement 3: After searching Employee Name, whenever you click on GO button results will be displayed
in the table list. So now the requirement is, to hide the column name called Manager. Let us see how to hide
the table column.

Select Personalize Employee Table, after that in the available name list check the Manager name, click on
Personalize image item in that particular row.
At site level in Personalization Properties, select false in the drop down list.

Click on Apply button and navigate to main page to see the output. So therefore with this requirement you
learned how to hide or remove the column name in OAF page.

General Page 263

Requirement 4: This requirement shows how to change the Submit Button name in OAF using
personalization.
In the main page you might have observed that we have a button called Create Employee. So here the
requirement is to change the Create Employee name to Create New Employee.
Select Personalize Employee Table, after that in the available name list check the Submit Button: Create
Employee. Click on Personalize Image icon.

After that at site level change the prompt name to Create New Employee.

Apply the changes and navigate to main page to see the output.

Requirement 5: In this requirement you are going to see how to change the display order in oaf page. The
requirement is to change the order series, i.e,. to reorder the columns in the OAF page.

Select Personalize Employee Table, after that select Reorder Image item, for example see the below image:

General Page 264

Select the Personalize check box at site level, for example see the below image:

Select the Column names which you want to move, move the columns using arrow buttons: -

Click on Apply button, navigate to main page to see the changes.

Requirement 6: This requirement shows you to change the column names in a table. For this Select
Personalize Employee Table, after that select Number column name in the personalization structure. Click
on Personalize image. For example see the below image:

After that at site level change the Prompt value to Employee Number. For example see the below image:-

General Page 265

After that click on apply button and navigate to main page to see the changes. The below image shows the
sample output after changing the column name in oaf using personalization.

Have Questions ? Ask in the Unit Forums

Previous Unit
Mark this Unit Complete

General Page 266

Вам также может понравиться