-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
|Receive Email for New Articles|
|Controller Extension in OA Framework is safe or unsafe ?||| 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 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?
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 oracle delivers a patch that modifies the code in original CO, yet your extension will still be upgrade safe, 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 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.
written by lakshmi , June 06, 2007
written by Suresh , June 15, 2007
written by MANIKANDAN , June 20, 2007
written by Anil Passi , June 20, 2007
written by zamora , September 04, 2007
written by zamora , September 05, 2007