Vous êtes sur la page 1sur 4

Apps - Controller Extension in OA Framework is safe or unsafe ?

Controller Extension in OA Framework is


safe or unsafe ?

Page 1 of 4

| Print |

Written by Anil Passi


Monday, 04 June 2007
You will often hear a sentence "extension to the controller is not safe."

In this article, lets discuss why such extension is unsafe, and what steps can we take to make the exten
to the OA Framework controller as safe as possible.
Lets do some Q & A
How do we extend the controller?
1. Create a new class file which extends the original controller's java class
2. Using personalization, personalize the region to which controller is attached.
Once in personalization screen for the region, replace the existing controller with your newly created
extended controller.
For detailed step by step explanation, please refer to this link

Controller can be extended at any of the levels at which personalization can be done. Unlike substitution
BC4J, extension to controller does not necessarily need to happen at site level. What I mean is that,
oneresponsibility can be personalized to use controller class say CO1 and the second responsibility can
configured to use controller class named CO2 (both for the same region/screen)
Why is the Controller extension unsafe?
Two reasons:Point 1. If in your extended CO class, you write a method named processRequest, then framework will
execute this method in your custom class. Framework will not execute the method in original controller
class.

Point 2. In Oracle Fusion Applications, the User Interface layer will certainly change, and controller may
exist in FUSION in same manner as we see it now. Hence you may have to re-develop/design your
extension to controller in equivalent technology in Fusion Apps [ADF with Faces].
What can we do to make the controller extension safe?
Whilst we can't do much about the "Point 2", but we can certainly play safe on "Point 1".

If in your extended controller, you call super() method, then there is a possibility that your extension is s
Your extended controller should
1. Call standard controller method(from original CO)
2. Do additional bits after or before calling the super()

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=154&pop=1... 10/30/2007

Apps - Controller Extension in OA Framework is safe or unsafe ?

Page 2 of 4

If oracle delivers a patch that modifies the code in original CO, yet your extension will still be upgrade sa
as your custom controller will continue to call current version of CO method via super().

If "Point 1" is taken care of, will my extension be 100% safe?


It will certainly be upgrade safe until Fusion, but upgrade-safe is different than safe extension.
For example, if you have five screens in a transaction, and if in your extension you make navigational ju
to last screen straight from first screen, then your extension may be flawed, despite being upgrade safe
Never compromise the Data Integrity in your extensions.

Moral of the story


There is no one size fits all when it comes to extension of controllers in OA Framework. Try to adhere to
principle of calling super(), to keep your controller extensions upgrade safe.

Fusion will bring a new paradigm to UI design in Oracle Self Service. However, mapping your Controller
extensions into ADF framework should be straightforward.

Comments (6)
Subscribe to this comment's feed

...
written by lakshmi , June 06, 2007
Please can u give one example for super()
...
written by Suresh , June 15, 2007

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=154&pop=1... 10/30/2007

Apps - Controller Extension in OA Framework is safe or unsafe ?

Page 3 of 4

Hi Anil,
Thanks for all the helpful documents available on this site. This is really helpful for all the Oracle
Apps Tech & Func Consultants.

I need your inputs for an issue i face in OA Framework - In my OAF page i am displaying a DFF wher
the user would create a new record and i have to save it to a database table through oracle standard
APIs. Do you know how can i get the values from the OAF page and send it to the database? Please
do give me sample code if you have one.
Thanks, Suresh.

...
written by MANIKANDAN , June 20, 2007
Hi anil,
This is manikandan.i am studying myself with helf of ur sites.
i installed OAF software while run the program i got standard error like system responsibility could no
find.
Please tell me the steps to fix the error.
please send me if you have any set up documents and also i need very basic steps in OAF to develo
one page

Thanks
M.Manikandan
...
written by Anil Passi , June 20, 2007
Hi M Manik
Please copy paste exact error from stack.
Also, under runtime connection in Project Setting, what is your value for Responsibility and
application?
Is that valid for the user specified?
Thanks
Anil
...
written by zamora , September 04, 2007
hi Anil,
all ur works are great.
I would like to know, where you hosting your web site, (this pages).
is it free, I would appreciate , if you could give some details.
...

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=154&pop=1... 10/30/2007

Apps - Controller Extension in OA Framework is safe or unsafe ?

Page 4 of 4

written by zamora , September 05, 2007


hi Anil,
all ur works are great.
I would like to know, where you hosting your web site, (this pages).
is it free, I would appreciate , if you could give some details.

Close Window

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=154&pop=1... 10/30/2007

Vous aimerez peut-être aussi