Fusion Blog

EBS Blog


Contact Us

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

OA Framework Extending Controller


The objective of this training lesson is to quickly show you how to Extend a Controller in OA Framework.


The basis of this article will be the HelloWorld OA Framework Example. This demonstration has been built using 11.5.10 CU2.

But this should work with any other version of OA Framework.


How will we demonstrate this?

a. We will create a Text Field named HelloWorldField in "OA Framework Page"

b. Using processRequest of the Controller, we will default "Hello not Extended Anil" to HelloWorldField

c. Next we will extend the controller, and assign "Hello Extended Anil" to the field HelloWorldField

Note: You must noe default values in field in this manner, when the field belongs to a VO


You have already implemented the Oracle delivered HelloWorld Example.


Follow the below Steps ( Some steps are a repeat of helloWorld tutorial from Oracle).

But this demo will use a cut-down version of helloWorld.

Estimated time:- 15minutes for this exercise.

Step 1. Create a New OA Workspace and a new OA Project and name it anything you desire.

    Package name can be oracle.apps.ak.hello

Also, attach dbc file, and a apps username/password that has responsibility FWK_TBX_TUTORIAL

Step 2. Add a new "OA Page"  named "textExtendCOPage" to the Project in package oracle.apps.ak.hello.webui

    Make sure its property AM Definition is oracle.apps.fnd.framework.server.OAApplicationModule

    Change its id to textExtendCOPage and ensure its of type pageLayout

    Also assign it any window tile  and title in its properties

Step 3. Add a region of type messageComponentLayout. Name it MainRNExt

    The Region Style will be messageComponentLayout

Step 4. Add a field HelloNameField to MainRNExt

The field will be of type messageTextInput. Give it a prompt of "TestPrompt"

Note:- We do not need a Go/Submit button for this demo.

Step 5. Rightclick on MainRNExt to add a new Controller to the region.

Make sure its package is oracle.apps.ak.hello.webui

Name of the controller will be MyTestCO

Step 5. Open the controller java file, which is MyTestCO.java

Make the following changes as highlighted

import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;


  public void processRequest(OAPageContext pageContext, OAWebBean webBean)


    super.processRequest(pageContext, webBean);

    OAMessageTextInputBean fieldHelloName =


    fieldHelloName.setText(pageContext,"Hello not Extended Anil");   


Build and Run the XML Page, the result will be as below

Now, the extension of OA Framework Controller

Extension Step 1. Rightclick on Project and create new

Name of the Class: extendedHelloCO

Package : oracle.apps.ak.extendCO

Extends: oracle.apps.ak.hello.webui.MyTestCO

Extension Step 2. Add the highlighted lines to extendedHelloCO.java

package oracle.apps.ak.extendCO;

import oracle.apps.ak.hello.webui.MyTestCO;

import oracle.apps.fnd.common.VersionInfo;

import oracle.apps.fnd.framework.webui.OAControllerImpl;

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.fnd.framework.webui.beans.OAImageBean ;

public class extendedHelloCO extends MyTestCO


  public void processRequest(OAPageContext pageContext, OAWebBean webBean)


    super.processRequest(pageContext, webBean);

    OAMessageTextInputBean fieldHelloName =


    fieldHelloName.setText(pageContext,"Hello Extended Anil");   




Extension Step 3. Ensure that personalization is turned on for your username.

This can be done by setting profile "Personalize Self-Service Defn" to Yes

Run the XML page, you will still see "Hello Not Extended Anil"

Click on Personalize Page link on right handside top corner.


Select "Complete View" and "Expand All" Option in personalization page.

Click personalize icon for "Message Component Layout: (MainRNExt)"

Set the controller to "oracle.apps.ak.extendCO.extendedHelloCO" at Site level.

Click on Apply, and then click onReturn to Application.


Extension Step 4. Rebuild project in jDev and run page again.

You will now find that your extension has taken effect.


Anil Passi


0 #1 Anil Passi 2007-02-19 00:00
Hi Sai

It is tough to debug without knowing the details of customizations that you have done.

Howeve , please check if you have any database trigger on AP_EXPENSE_REPO RT_LINES_ALL

0 #2 Sai 2007-02-19 00:00
Hi Anil,

Error when updating the saved Expense Report

On Oracle Internet Expense (OIE) when user tries to update the saved expense report system gives following error message:

Una ble to perform transaction on the record.
nCause: The record has been deleted by another user.
nAction: Cancel the transaction and re-query the records to get the new data.

Steps to reproduce this issue:

1) From Expense Home Page – Update a saved expense report

2) For any expense report line – go to the details page, update any field (say Justification), Click Return button, Click Save button on the Expense page

3) Again go to the details page, update any field (say Justification), Click Return button, Click Save button on the Expense page

4) This time the system gives the above error message

Note :

1) We have some OAF customizations and the issue is NOT happening on vanilla (non-customized ) instance.

2) It is only when the user try to save the update done for the second time on the Expense Detail Page.

3) We have found a metalink note: 352698.1 with same error but unable to interpret it.

Any pointers to resolve this issue are highly appreciated.

Thanks and Regards,
0 #3 Sai 2007-02-28 00:00
Hi Anil,

Thanks for your response. I have further debugged this issue and got to know where exactly the code is failing.

In iExpenses when the user try to save the update done for the second time on the Expense Detail Page then in the code following happens:

1) When Click on SAVE button then ButtonsCO in ProcessFormRequ est is called >

2) Then RootApplication Module: WebExpensesAM invokes Method: SaveExpenseRepo rtFromWeb

3) Which in turn invokes the Method: SaveExpenseRepo rt

4) In Method: SaveExpenseRepo rt the code - OADBTransaction Impl.commit fails

a) This issue happens only when user try to save second time. The first time it works fine.
b) Also this happens only when we go to expense line detail page, make some changes, Return to expense line page and here do SAVE.
c) We have extended the DetailMainCO

Can you please look into this and give some pointer? If possible please provide with your contact number.

Than ks and Regards,
0 #4 Anil Passi 2007-02-28 00:00
hi sai

i believe u have checked that trigger does not reside on that table.

If u remove ur controller extension, then does error disappear?

a lso, check if the data is getting saved despite the exception error message?

wha t exactly r u doing in CO extension. kindly email me DetailMainCO.ja va and also tthe base class

email me those details and ur telephone number

i need to check if extension can impact the link age between exp line and exp detail

anilpassi at gmail dott com

0 #5 sai 2007-03-01 00:00
Hi Anil,

I posted a mail to your gmail account with details requested.

W aiting for your response.

Th anks and Regards,
0 #6 Nagu 2007-03-14 00:00
I am trying to extend the Eo and VO in isupplier portal.I have brought the necessary files from java_top and kept in the jdev classpath.I am unable to load the respective bc4j package into my project as it does not contain server.xml file.It was directly loading the xml files into project.so now how do i extend the eo n vo
plz help me.......
0 #7 Anil Passi 2007-03-15 00:00
hi Nagu

server. xml should be in /server directory. this is where AM and VO reside.

Alte rnately, you can simply select the top directory and open the entire directory itself. jdev should build bc4j for you.

if you get an error, then it will most probably be for some other dependent classes that are not in your classpath

th anks
0 #8 Sakthi 2007-05-07 00:00
Hi Anil,

I Need to customize a lot of seeded objects of a particular module(say AR).Please let me if I have to pull out all the objects for the complete module (say $JAVA_TOP/oracl e/apps/AR) to my local system.Where do I place these files(In myprojects or myclasses).

0 #9 anu 2007-08-01 05:40
I am new to oracle applications Framework and i want to know bout property inspector's various field as i hav so many confusions. I searched for the document regarding this , but i didnt get any. If anyone can guide me in using efficiently the property inspector.

Tha nks,
0 #10 Anil Passi 2007-08-01 05:52
Hi Anu,

In jDeveloper, Jut hit F1 key when your cursor is on property inspector. Each property is well documented.

Th anks,
0 #11 zamora 2007-09-05 07:12
very good, all your works are good.
but i want to know, where you are hosting your pages. is it free.
please give me the link to the host company
0 #12 Mail 2007-09-23 18:13
Hi anil,
Today first time I am going through your site and I found it very useful for quick learning. But on some pages I am not able to view screen shots.
0 #13 Anil Passi 2007-09-24 05:44
Hi Mail

Your ISP must be blocking docs.google.com
The images are hosted on google docs.

A nil Passi
0 #14 Amol 2007-09-24 10:09
Oracle doesnt recommend extending Controller.
I am wondering why they suggest extension of VOs but not Controllers. I am assuming that personalizatins are mentioned even after upgrade.

Any thoughts on this?
0 #15 Anil Passi 2007-09-24 13:18 Quote
0 #16 Vasantha 2007-11-27 04:44
Hi Anil,
I have a very small doubt .. Please clarify it.. How can we call a custom jsp page from an OA page so that the jsp page should open in a new window. I tried many ways but it is geting opened in the same page itself. Kindly help me.. I am in need of it..

0 #17 Anil Passi 2007-11-27 07:15
Hi Vasantha

You can set Target Frame = _blank.
Please see the image below.

Anil Passi
0 #18 SunilKSadige 2008-01-30 20:19
Hello Anil,
Can you please help me on this. I need to customize "Create Expense Report: General Information". I want the list for "Expense Template" to contain just the Expense Report Templates which are intended for the respective Employee Department. So, for any employee the Template list should contain all the Templates which belong to his department.

Th anks,
0 #19 Devi Yogha 2008-03-05 08:05
Hi Anil,
We are trying to call a API in the GO button in Buyer Work Center -> Orders. For that we want to modify our Controller file by extending the existing controller file with the New Java class as per your steps in http://www.google.com/search?q=site:apps2fusion.com+oa-framework-extending-controller-steps
But while creating the Java class, it isnt accepting our existing Controller file(OrdersSumm aryCO.java). The error says Not valid Base class for this operation.
Plea se help me ASAP in this.
Thanks a lot.

D evi
0 #20 Anil Passi 2008-03-05 18:46
Hi Devi

I would like to see your custom controller class.

Email me the same

An il
0 #21 Rao Chennuri 2008-08-01 13:02
Hi Anil,

We have a requirement to set the lov to some default value which can not be done by VO change. So, we need to customize TimecardCO.java . We have done the change and timebeing we have replaced the customized class.

Do we have any otherway to substitute the original CO with custom CO?

0 #22 kritika 2009-05-21 08:06
Hi anil,

I have extended the existing CO by creating a new java class.

I am not able to generate the classn file of the extended CO that is the new one.
Please its a bit urgent issue. How can i possiblly generate the class file for this.
while compiling it does not gives any error still class file is not getting generated.

Kri tika
0 #23 kritika 2009-06-01 06:40
I have deployed the new class on client instance its giving error.

Could not create java class...

kindl y help me regarding this.
0 #24 Srividya 2009-06-04 09:58
I get the below error when I compile my script while trying to extend CO....
Could anyone check and let me know what needs to be done....

Error (10,42): IrcOAController Impl not found in class oracle.apps.irc .candidateSelfS ervice.webui.Em pJobSearchCO in class keane.oracle.apps.irc .candidateSelfS ervice.webui.Em pJobSearchCO_8393

0 #25 pablo 2009-07-21 02:11
sorry Ani for so basic answer, but if i want to change a query for a standard page, lets say in iProcurement, the requisition pages, i go to About this page and see the controller...wh ere is that code in the Unix box? do i need to get that code , edit in my machine and ftp again to the Unix box?

if you have any link there, of the first step of extending controllers, please let me know.

thanks in advance!!!
Pabl o.
0 #26 harsh 2015-09-15 11:52
I have deployed the new class on client instance its giving error.

Could not create java class...

kindl y help me regarding this.

Add comment

Security code

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Jun 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
   1  2  3  4  5  6
  7  8  910111213

Enquire For Training

Fusion Training Packages

Get Email Updates

Powered by Google FeedBurner