Thursday 20 October 2011

Controller Extension Steps in OAF


EXTENSION IN OAF
Controller Extension Steps:
Extension Step 1. Rightclick on Project and create new
Name of the Class: extendedHelloCO
Package : oracle.apps.ak.extendCO
Extends: oracle.apps.ak.hello.webui.MyTestCO


Extension Step 2. Add the highlighted lines to extendedHelloCO.java
package oracle.apps.ak.extendCO;
import oracle.apps.ak.hello.webui.MyTestCO;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.fnd.framework.webui.beans.OAImageBean ;


public class extendedHelloCO extends MyTestCO
{
  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
    OAMessageTextInputBean fieldHelloName =
      (OAMessageTextInputBean)webBean.findChildRecursive("HelloNameField");
    fieldHelloName.setText(pageContext,"Hello Extended Anil");   
  }
}

Extension Step 3. Ensure that personalization is turned on for your username.
This can be done by setting profile "Personalize Self-Service Defn" to Yes
Run the XML page, you will still see "Hello Not Extended Anil"
Click on Personalize Page link on right handside top corner.

Select "Complete View" and "Expand All" Option in personalization page.
Click personalize icon for "Message Component Layout: (MainRNExt)"
Set the controller to "oracle.apps.ak.extendCO.extendedHelloCO" at Site level.


Click on Apply, and then click onReturn to Application.

Extension Step 4. Rebuild project in jDev and run page again.
You will now find that your extension has taken effect
 http://docs.google.com/File?id=dkg3r3j_109gsjmqm


No comments:

Post a Comment