In this article, lets discuss why such extension is unsafe, and what steps can we take to make the extension 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 substitutions to 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 be 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 not 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 safe.
Your extended controller should
1. Call standard controller method(from original CO)
2. Do additional bits after or before calling the 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 jump 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 the 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.
Set as favorite
Bookmark
Email This
Hits: 9071
Comments
(19)
...
written by lakshmi , June 06, 2007
written by lakshmi , June 06, 2007
Please can u give one example for super()
Votes: +0
report abuse
vote down
vote up
...
written by Suresh , June 15, 2007
written by Suresh , June 15, 2007
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 where 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.
Votes: +0
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 where 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.
report abuse
vote down
vote up
...
written by MANIKANDAN , June 20, 2007
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 not 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 develop one page
Thanks
M.Manikandan
Votes: +0
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 not 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 develop one page
Thanks
M.Manikandan
report abuse
vote down
vote up
...
written by Anil Passi , June 20, 2007
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
Votes: +0
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
report abuse
vote down
vote up
...
written by zamora , September 04, 2007
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.
Votes: +0
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.
report abuse
vote down
vote up
...
written by zamora , September 05, 2007
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.
Votes: +0
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.
report abuse
vote down
vote up
CO EXTENSION
written by kritika , May 21, 2009
written by kritika , May 21, 2009
AFTER extension and personalization the page is not reflecting the changes please help.
In personalization it shows the extended co.
Kritika
Votes: +0
In personalization it shows the extended co.
Kritika
report abuse
vote down
vote up
CO EXTENSION...Still not the desired output
written by kritika , May 22, 2009
written by kritika , May 22, 2009
Hi anil
Thanks for the reply.
I have to test it on local company instance not on local machine jdeveloper before doing on client instance.
Can't use debugging tools.
And even the files that i imported from server are not running very fine. Means i am not able to go to personalize link on local machine. So i tested it on local instance.
I tried bouncing the server and deploying JPX file also at local instance
Doubts:
1. Do CO extension needs JPX importer step?? (still i did it)
Problem still persist. Basic problem is even after the co for the class is changed it doesnot picks up the new code...
Obviously new class is extending the previous one but code thats changed should b picked from this.
If i am wrong some where please correct me.
2. My new class extends the previous one and both have processformrequest and procesrequest.
So its picking the code from the old classes function??
3. If this is the problem wat should i do...if not then where exactly i need to modify.
(For CO extension i read that " replace the whole code edit it in your extended class as per requirement. still it extends the previos one" I have done this)
Regards
K.Kritika
Votes: +0
Thanks for the reply.
I have to test it on local company instance not on local machine jdeveloper before doing on client instance.
Can't use debugging tools.
And even the files that i imported from server are not running very fine. Means i am not able to go to personalize link on local machine. So i tested it on local instance.
I tried bouncing the server and deploying JPX file also at local instance
Doubts:
1. Do CO extension needs JPX importer step?? (still i did it)
Problem still persist. Basic problem is even after the co for the class is changed it doesnot picks up the new code...
Obviously new class is extending the previous one but code thats changed should b picked from this.
If i am wrong some where please correct me.
2. My new class extends the previous one and both have processformrequest and procesrequest.
So its picking the code from the old classes function??
3. If this is the problem wat should i do...if not then where exactly i need to modify.
(For CO extension i read that " replace the whole code edit it in your extended class as per requirement. still it extends the previos one" I have done this)
Regards
K.Kritika
report abuse
vote down
vote up
...
written by kritika , May 22, 2009
written by kritika , May 22, 2009
Hi anil
Thanks for the reply.
Yes i bounced the appache server. I am working on r11i only.
About page is displaying the name of the new class. (Extended one which has the new code)
I tried to call super.processrequest after the condition.
Its giving NULL pointer exception.
In java we use to make base class function virtual to acces the dirived ones.
I guess we cant touch the standard controller in my case.
Is der any thing i can do in my new class so that new code gets excecuted rather than old one?
Kritika
Votes: +0
Thanks for the reply.
Yes i bounced the appache server. I am working on r11i only.
About page is displaying the name of the new class. (Extended one which has the new code)
I tried to call super.processrequest after the condition.
Its giving NULL pointer exception.
In java we use to make base class function virtual to acces the dirived ones.
I guess we cant touch the standard controller in my case.
Is der any thing i can do in my new class so that new code gets excecuted rather than old one?
Kritika
report abuse
vote down
vote up
...
written by kritika , May 22, 2009
written by kritika , May 22, 2009
I am stuck with NULL Pointer exception.
I even tried not to extend the previous class as code is totally repeated in this.
Still null pointer exception is coming.
I have deleted the part which is not required from the existing code only if condition is der still
Null pointer exception is der if i call super afterwards.
Now if super is before condition it goes to base classezs function,
Kritika
Votes: +0
I even tried not to extend the previous class as code is totally repeated in this.
Still null pointer exception is coming.
I have deleted the part which is not required from the existing code only if condition is der still
Null pointer exception is der if i call super afterwards.
Now if super is before condition it goes to base classezs function,
Kritika
report abuse
vote down
vote up
...
written by kritika , May 22, 2009
written by kritika , May 22, 2009
HI anil,
I have made custom class without extending and subtitued in a new package.
and in personalization of page i gave that add***s.
For time being it working fine as the new class has all the code( I got the code using jcompiler
)
The solution is time being for the demo i need to still extend the original class only.
Thanks a lot for ur help.
Kritika
Votes: +0
I have made custom class without extending and subtitued in a new package.
and in personalization of page i gave that add***s.
For time being it working fine as the new class has all the code( I got the code using jcompiler
) The solution is time being for the demo i need to still extend the original class only.
Thanks a lot for ur help.
Kritika
report abuse
vote down
vote up
IT WORKED
written by kritika , May 27, 2009
written by kritika , May 27, 2009
Hi anil,
I just want to share that extending controller is working fine
(I really dnt knw wat made the difference n y it was not working that day.
Next day i just recreated a customized package did everything again n it was working fine..)
Declaring super after customized code made every thing worked....
Thanks a lot..
Kritika
Votes: +0
I just want to share that extending controller is working fine
(I really dnt knw wat made the difference n y it was not working that day.
Next day i just recreated a customized package did everything again n it was working fine..)
Declaring super after customized code made every thing worked....
Thanks a lot..
Kritika
report abuse
vote down
vote up
...
written by kritika , June 02, 2009
written by kritika , June 02, 2009
HI anil,
The work is related to isupplier responsibility.
In the i-supplier responsibility when we create an ASN.(add header quantity , Shipment lines)
then we click on Submitt button.
This button moves to a conformation page.
Now we need to move to summary page of that asn.
Directly we can go to summary page through
View/CancelASn--->Clicck on any asn-->summary page.
Problems:
1. After extending co the page is visible but functionality(cancel shipment button) of the page is not working.
2. I am passing shipment number asn type and vendor id and vendorsite id...
vendor id and vendor siteid are comming as null.
(vendor id and vendor site id and header id these are not avialable at page level but are in VO.)
Regards
k.Kritika
Votes: +0
The work is related to isupplier responsibility.
In the i-supplier responsibility when we create an ASN.(add header quantity , Shipment lines)
then we click on Submitt button.
This button moves to a conformation page.
Now we need to move to summary page of that asn.
Directly we can go to summary page through
View/CancelASn--->Clicck on any asn-->summary page.
Problems:
1. After extending co the page is visible but functionality(cancel shipment button) of the page is not working.
2. I am passing shipment number asn type and vendor id and vendorsite id...
vendor id and vendor siteid are comming as null.
(vendor id and vendor site id and header id these are not avialable at page level but are in VO.)
Regards
k.Kritika
report abuse
vote down
vote up
"OASubTableLayoutBean" givin error in controller class exception
written by kritika , June 02, 2009
written by kritika , June 02, 2009
Hi Anil,
on the client instance i have extended the controller class and have made changes in ProcessFormRequest
method.
but it is giving "Java null pointer exception" on the SubTableLayoutbean which is also present in standard
functionality.
here is the xcat line which z givin error
if(oapagecontext.getParameter("SubmitBtn") != null)
{
if(oasubtablayoutbean.getSelectedIndex(oapagecontext) == 1)
{
Votes: +0
on the client instance i have extended the controller class and have made changes in ProcessFormRequest
method.
but it is giving "Java null pointer exception" on the SubTableLayoutbean which is also present in standard
functionality.
here is the xcat line which z givin error
if(oapagecontext.getParameter("SubmitBtn") != null)
{
if(oasubtablayoutbean.getSelectedIndex(oapagecontext) == 1)
{
report abuse
vote down
vote up
Oracle Developer
written by Teresa , May 13, 2011
written by Teresa , May 13, 2011
Hi Anil,
Before loading the extended controller to the server, how can I run it from my JDeveloper to ensure the logic and everything else are correct. Can I get the associated OAF page or region from the database and plug it in "myprojects" folder in Jdev and run that page from JDeveloper? Thank you very much.
Regards,
Teresa
Votes: +0
Before loading the extended controller to the server, how can I run it from my JDeveloper to ensure the logic and everything else are correct. Can I get the associated OAF page or region from the database and plug it in "myprojects" folder in Jdev and run that page from JDeveloper? Thank you very much.
Regards,
Teresa
report abuse
vote down
vote up
impact of upgradation on Controller Extension
written by Sabeena Begum , September 23, 2011
written by Sabeena Begum , September 23, 2011
Hi Anil,
Useful Article.
Normally,
Am doing Controller Extension for the seeded controller class using the method super.ProcessRequest() say for the customer creation Page in R12.
After CO extension and personalizing the page, itis working fine now.
I have a question as if a patch is applied for the upgradation, will the extended Controller gets affect?
The standard CO reflects or our extended CO reflects the same in Page?
Votes: +0
Useful Article.
Normally,
Am doing Controller Extension for the seeded controller class using the method super.ProcessRequest() say for the customer creation Page in R12.
After CO extension and personalizing the page, itis working fine now.
I have a question as if a patch is applied for the upgradation, will the extended Controller gets affect?
The standard CO reflects or our extended CO reflects the same in Page?
report abuse
vote down
vote up
| < Prev | Next > |
|---|




