Wednesday 30 January 2013

15. Personalization, Extension & Customization in OAF

While dealing with Oracle EBS html based pages, we can modify or create completely new page using any of the below methods:

Personalization
======================
Personalization is the process of making changes to the User Interface (UI) from within an Oracle E-Business Suite Page.
Using 'Personalize Page' link or from 'Functional Administrator' responsibility, we can perform personalization.
'Personalize Page' link shows all the regions and items used in the page in hierarchical form for example as shown below:


















From here, we can modify/personalize almost any items/region using 'Personalize' icon. We can modify properties such as Prompt, Rendering of item, making fields Required and others as shown below:




















All the personalizations get stored in MDS (i.e. JDR_% tables) by creating a new document ID for the page. Thus any patch will modify the original document ID (standard one) and unlike forms these personalizations will not get removed.

Extenion
======================

There are not many things we can do using personalization such as changing the logic or control settings of the page. For these modifications we use extension. It is the process of making changes to the programmatic elements of an E-Business Suite form/page. It is possible to extend OA Framework-based pages either using controller extension or AM extension or by performing VO substitutions.

Controller extension
Oracle does not recommend to extend controller objects associated with regions in seeded EBS product pages. One reason is that controller code is subject to change at any time, and Oracle cannot guarantee that extended controller code will work after the updates.
However, we extend controller code quite regularly. For example, we need to create a web beans programmatically on the fly in the controller code instead of declaratively, which is not possible through personalization.
To extend a controller, first we create a new class file that extends the original controller’s Java class. Next, using personalization, we personalize the region to which the original controller is attached. Once in the personalization screen for the region, replace the existing controller with the newly created extended controller.
If in the extended CO class we override processRequest(), then OA Framework will invoke the overridden method in the custom class. OA Framework will not execute the method in the original controller class unless super.processRequest() is called in the extended class.

View Object Extension
Sometimes there is requirement to display additional information on screens that display data fetched from view objects. To do this, we need to do three things:
  • First, we need to create an additional field on the page using personalization.
  • Then, create a new view object. This new view object extends the existing view object, which is why it inherits all the features and columns of the existing view object. This is referred to as view object extension.
  • Later we create a substitution in JDeveloper; the substitution contains the directive to replace the existing view object with the new view object at runtime.
Entity Object Extension
We extend entity objects to add extra validation to some fields/records. We can also extend entity objects to assign default values to the attributes. Steps for extending the entity object are similar to those for extending view objects.

Application Module Extension
In AM, Oracle seeded code initiates PL/SQL JDBC calls. Sometimes, there is a need to enhance that PL/SQL call by some additional PL/SQL calls. In such cases, we can extend the Application Module. Steps for extending the AM are similar to those of extending a view object and entity object.
For example an Application Module has following methods:

public String method1(parameters) {....}
public boolean method2(parameters) {....}
public String method3(parameters) {....


Lets say we need to raise some business event if method2 returns false. So, we will code the extended Application Module as shown below:

public boolean method2(parameters) {

   if !(super.method2(parameters)) {
       // business logic comes here
   }

Customization
======================

Customization is the process of creating new OAF pages. While Oracle does provide tools to do this (i.e., JDeveloper 10g with OA Extension), this is the only and least supported option.






4 comments:

  1. Hi,

    Do you think is possible to retrieve the actual HTML or any information from something like

    Attribute HR_NTF_EMBEDDED_REGION refers to Framework Region JSP:/OA_HTML/OA.jsp?OAFunc=-HR_COMP_NTF_SS-&NtfId=-35815463-.

    ??

    Help!!!

    ReplyDelete
  2. Hi, I am a functional person. Need to write a specification for restricting the display of certain rows...How can we do this ?....
    Appreciate your time and knowledge sharing,

    Regards,

    ReplyDelete
  3. Hi sushantsh51,
    I have one doubt how to change lov's(Project,Task and Type) to picklist on Create Timecard page.Please help this.If u have any code please drop to this mail id praja.reddy88@gmail.com

    ReplyDelete
    Replies
    1. You can create a messageChoice item using Personalization. Enter the VO definition. Specify the attribute you intend to use as a value attribute and which one as a display attribute.

      Delete