4
Controller Extension in OA Framework is safe or unsafe ? | Print | Written by Anil Passi Monday, 04 June 2007 Monday, 04 June 2007 Monday, 04 June 2007 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 to the OA Framework controller as safe as possible. Lets do some Q & A Lets do some Q & A Lets do some Q & A 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 c 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 s BC4J, extension to controller does not necessarily need to happen at site level. What I mean oneresponsibility can be personalized to use controller class say CO1 and the second respon configured to use controller class named CO2 (both for the same region/screen) Why is the Controller extension unsafe? Why is the Controller extension unsafe? Why is the Controller extension unsafe? Why is the Controller extension unsafe? Two reasons: - Point 1. Point 1. Point 1. Point 1. If in your extended CO class, you write a method named processRequest, then frame execute this method in your custom class. Framework will not execute the method in original class. Point 2. Point 2. Point 2. Point 2. In Oracle Fusion Applications, the User Interface layer will certainly change, and cont exist in FUSION in same manner as we see it now. Hence you may have to re-develop/design extension to controller in equivalent technology in Fusion Apps [ADF with Faces]. What can we do to make the controller extension safe? What can we do to make the controller extension safe? What can we do to make the controller extension safe? 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 exte Your extended controller should Your extended controller should Your extended controller should Your extended controller should 1. Call standard controller method(from original CO) 2. Do additional bits after or before calling the super() Page 1 of 4 Apps - Controller Extension in OA Framework is safe or unsafe ? 10/30/2007 http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=154&pop=1...

Controller Extension

Embed Size (px)

DESCRIPTION

Controller Extension

Citation preview

  • Controller Extension in OA Framework is

    safe or unsafe ? | Print |

    Written by Anil Passi Monday, 04 June 2007 Monday, 04 June 2007 Monday, 04 June 2007 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 & ALets do some Q & ALets do some Q & ALets 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?Why is the Controller extension unsafe?Why is the Controller extension unsafe?Why is the Controller extension unsafe? Two reasons:- Point 1.Point 1.Point 1.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.Point 2.Point 2.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?What can we do to make the controller extension safe?What can we do to make the controller extension safe?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 shouldYour extended controller shouldYour extended controller shouldYour extended controller should 1. Call standard controller method(from original CO) 2. Do additional bits after or before calling the super()

    Page 1 of 4Apps - Controller Extension in OA Framework is safe or unsafe ?

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

  • 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?If "Point 1" is taken care of, will my extension be 100% safe?If "Point 1" is taken care of, will my extension be 100% safe?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 storyMoral of the storyMoral of the storyMoral 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.

    Comments (6)

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

    ............ written by Suresh , June 15, 2007

    Subscribe to this comment's feed

    Page 2 of 4Apps - Controller Extension in OA Framework is safe or unsafe ?

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

  • 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.

    ............ 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

    ............ 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.

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

    Page 3 of 4Apps - Controller Extension in OA Framework is safe or unsafe ?

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

  • Close Window

    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.

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

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