Steps To Migrate Personalizations in OAF

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

Steps To Migrate Personalizations In OAF

Following steps should be performed in order to migrate Personalizations from one


instance to another.
Steps To Be Performed In Source Instance

1. Set profile option "FND: Personalization Document Root Path" with the
location (path) of the server where personalization should be extracted before
exporting personalization.
2. Go to Functional Administrator.Click on Personalization tab.
3. Under Import/Export click on Personalization Repository.
4. Give Document Root Path as "/oracle/apps/pos/supplier/webui" and
press Go.Page will display all the Personalizations.
5. Select all the listed Personalizations which you want to export and press Export to
File System.

6.

o Go to the path in "FND: Personalization Document Root Path" and run


" tar -cvf xxPersonalizations.tar ./* ".
o Transfer the xxPersonalizations.tar to destination in Binary mode.

Steps To Be Performed in destination instance

o Set profile option "FND: Personalization Document Root Path" with the
location (path) of the server (from where personalizations will be imported)
before importing personalizations.
o Copy .tar file to middle tier directory pointed by "FND: Personalization
Document Root Path".
o Run " tar -xvf xxPersonalizations.tar ".
o Go to Functional Administrator.Click on Personalization tab.
o Under Import/Export click on Exported Personalizations.
o Click on Import from File System as shown in the following screenshot
Note: Instead of using Functional Administrator you can also use java
oracle.jrad.tools.xml.importer.XMLImporteralso to upload Personalizations.

Deploying OAF Personalizations Using the


Import/Export Command Line Tools
September 28, 2011 Leave a comment
After personalizing and testing framework pages in a Development instance, you may wish to
automate the transfer of these changes to another instance, rather than manually re-doing them
all again. This objective can be achieved by exporting the personalizations from the
Development instance, then importing them to a different instance or instances

You can either use the GUI interface in “Functional Administrator” (Personalization tab) to
transfer personalizations, or can invoke the XMLImporter/XMLExporter commands directly
from the command line. The Export tool allows you to export a package or xml file (along with
translation information) from the MDS repository of a database instance to a .xml file (or .xlf file
for translations). The command line Export tool is necessary if you wish to perform bulk
translations of personalization documents.

This post provides the below detailed steps how to transfer personalizations from one instance to
others using the XMLImporter/XMLExporter tool.

1. Get Document Name

Go to the page you want to copy the personalization from and click the “about this Page” link at
the bottom of the page. You will see the page name with full path which starts with
/oracle/apps/<prod>.

Ex: /oracle/apps/icx/por/wf/webui/ReqLinesNotificationsRN

2. Get the Personalization Document info

Run the following command in TOAD or other tools as APPS user

1set serveroutput on
2exec jdr_utils.listCustomizations('<full document name from step 1>');

Example:

set serveroutput on
1exec
2jdr_utils.listCustomizations('/oracle/apps/icx/por/wf/webui/ReqLinesNotificat
ionsRN');

Output:

anonymous block completed

/oracle/apps/icx/por/wf/webui/customizations/site/0/ReqLinesNotificationsRN
Note: If there are multiple records returned by this command, you will need to use export/import
each item individually that you wish to export. You may also find there are records returned for
seeded personalizations provided by Oracle which do not need to be exported.

3. Use XMLExporter to export personalization document


java oracle.jrad.tools.xml.exporter.XMLExporter <personalization document
1from step #2> \
2-username "<username>" -password "<password>" \
3-dbconnection "(description=(address_list=(address=(protocol=tcp)
4(host=<host>)(port=<port)))(connect_data=(sid=<sid>)))" \
-rootdir "<output directory>"

Example:

java oracle.jrad.tools.xml.exporter.XMLExporter \
1/oracle/apps/icx/por/wf/webui/customizations/site/0/ReqLinesNotificationsRN -
username apps -password w3lcome123 \
2-dbconnection "(description=(address_list=(address=(protocol=tcp)
3(host=myhost)(port=12345)))(connect_data=(sid=dev)))" -rootdir
"$XXSCM_TOP/install" \

Here one file named ReqLinesNotificationsRN.xml will be created in the below path:
XXSCM_TOP/install/oracle/apps/icx/por/wf/webui/customizations/site/0. Open the file and you
will able to view the personalizations that you have done.

4. Use XMLImporter to import personalization document

Run the below command in the Instance where you want to import your personalization.

java oracle.jrad.tools.xml.importer.XMLImporter \
1<full path of the file you want to import> \
2-username "<username>" -password "<password>" \
3-dbconnection "(description=(address_list=(address=(protocol=tcp)
4(host=<host>)(port=<port>)))(connect_data=(sid=<sid>)))" -rootdir "<top level
directory>" \
5-rootPackage "/oracle/apps/<prod>"

Example:

java oracle.jrad.tools.xml.importer.XMLImporter \
1$XXSCM_TOP/install/ReqLinesNotificationsRN.xml \
2-username apps -password w3lcome123 \
3-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=
4myhost)(port=12345)))(connect_data=(sid=dev)))" -rootdir "$XXSCM_TOP/install"
\
5-rootPackage "oracle/apps/icx/por/wf/server"
Advertisements
Deploy OAF page
Guest Author

1. Copy all files from local machine to appropriate $JAVA_TOP directory

2. Compile all java files (Controller Files) with command javac <file_name>.java

3, Call java importer to import all xml files

java oracle.jrad.tools.xml.importer.XMLImporter
$JAVA_TOP/prajkumar/oracle/apps/fnd/webui/HelloWorldPG.xml -username apps -
password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=
<name of HOST>)(PORT=<port_number>))(CONNECT_DATA=(SID=<SID_NAME>)))"
-rootdir $JAVA_TOP

4. Print Documents to check imported XML page content (Optional)

jdr_utils.printDocument('/prajkumar/oracle/apps/fnd/webui/HelloWorldPG',1000)

Example –

DECLARE

BEGIN

jdr_utils.printDocument('/prajkumar/oracle/apps/fnd/webui/HelloWorldPG',1000);

EXCEPTION

WHEN OTHERS THEN

DBMS_OUTPUT.PUT_LINE(SQLERRM);

END;

5. Create form function with property "SSWA jsp function" and webhtml
"OA.jsp?page=/prajkumar/oracle/apps/fnd/webui/HelloWorldPG"
6. Add function to menu
7. Add menu to responsibility
Partial Page Rendering (PPR) in OAF

PPR is a technology that lets you refresh a specific part of a page when you want to make a UI change
instead of having to refresh (redraw) the entire page.

Gives users a more responsive and interactive application

Improves application Performance

Steps for Partial Page Rendering:-

First create one workspace and project.

Create the AM.

Create one Page and attach the page AM to it.

Create one Entity object and VO and attach to AM.

Create the controller.

For PartialRendering here I am using my data insert project only.

The structure of my data insert project is like this.


The output of my Data Insert page is like.
For partial Rendering in the above example

If the position code is “DIRECTOR” it should hide the managerID

For this first make the position code item as message choice.

position-->itemStyle-->messegeChoice

DATA-->

piclistViewInstance-->Give the view instance name

PicklistDisplayAttribute-->what we want to display in message choice

the column name of that(Meaning)

PiclistValueAttribute-->what value shuld take.

Next create one PartialVO without any query.

And after that create one transient attriobute.

Right click on PartialVO and select edit.


Click new.

U will get the window for creating new attribute set the following properties.

Name:- ManagerIDRendered

Type:- BOOLEAN.

Click Apply and ok.


After creating the partialVO.

Select the positionCode item and in the property inspector set the following properties.

Client Action---- >

Action Type-- > firePartialAction.

Event --- > positionEvent.


Select the managerID item and set the following properties

managerid-->visual

->Rendered-->${oa.<Partial View Instance Name>.<New Attribute Name>}

${oa.PartialVO1. ManagerIdRendered}
Create one method in AM java file

public void Partialvo()

OAViewObject vo=getPartialVO1(); //we have to create one new partialvo

if(!vo.isPreparedForExecution())

vo.executeQuery();

}
OARow row=(OARow)vo.createRow();

vo.insertRow(row);

vo.first().setAttribute("ManagerIdRendered",Boolean.TRUE);

Create the method for hide and show of managerID

public void showManager(String PositionCode)

OAViewObject vo=getPartialVO1();

if(PositionCode.equalsIgnoreCase("DIRECTOR"))

vo.first().setAttribute("ManagerIdRendered",Boolean.FALSE);

else

vo.first().setAttribute("ManagerIdRendered",Boolean.TRUE);

}
Write the following code in processRequest of the controller.

OAApplicationModule am=(OAApplicationModule)pageContext.getRootApplicationModule();

//call the method we created for creating new row

am.invokeMethod("Partialvo");

Write the following code in the processFormRequest.

if(eventName.equalsIgnoreCase("positionEvent")) //the event name that we given in

position column

String position=pageContext.getParameter("PositionCode"); //the id of the position column

Serializable [] parm={position};

am.invokeMethod("showManager",parm);//we have to call the method that we created for


showing managerid

Run the page to see the output.


If u select the position as director the manegerID should hide.
How to do Controller Extension in OAF
Uday

September 22, 2016

No Comments

 Objective

The Objective of this session is to learn how to Controller Extension in an OA

Framework Page.

 Process
o Identify the page where we wanted to controller extension
 Navigation : Manager Self-Service -> Hire
 Requirement : Say, we wanted to make Social Security as mandatory field using
controller extension.

o Identify the Controller

Go to About this page and identity the controller associated with it:

oracle/apps/per/selfservice/newhire/webui/NewHireMainPageCO

o Download the class file

Please connect using win scp or any other FTP tool and navigate to $JAVA_TOP and
download the class file
oracle/apps/per/selfservice/newhire/webui/NewHireMainPageCO.class
o Copy the file to your JDeveloper

Please copy that above class file to the appropriate directory structure present in
“My Classes” folder present in your JDeveloper

o Create Custom Controller

Go to your JDeveloper and create a new controller XxapNewHireMainPageCO


extending NewHireMainPageCO.class

a) Create a dummy page

b) Set new controller

c) At class declaration line after extends copy


oracle.apps.per.selfservice.newhire.webui.NewHireMainPageCO

o Code the logic in your Custom Controller


 Developer the custom logic to achieve your requirement and modify the
controller accordingly.
 As our requirement is to make “Social Security” as mandatory field, please get a
handle to that web bean from the processRequest method of the controller and
set the required property to “Yes”.
 Edit the process Request and paste the following code:

super.processRequest(pageContext, webBean);

OAMessageTextInputBean ssnBean =
((OAMessageTextInputBean)webBean.findChildRecursive(“HireNational
Identifier”));

ssnBean.setRequired(“yes”);

o Compile the Controller and upload it to $JAVA_TOP

Please compile the Controller java file and copy the class file to the $JAVA_TOP
of the instance

o Personalize the page and set custom controller


 Please click on “Personalize “Hire Employee”” link
 Then click on the personalize “pencil icon”
 Provide the value of your custom controller at site level
 Click on “About this Page” link and now we notice that the custom controller is
taking effect:

o Bounce apache

Bounce oacore using the following commands.

a) cd $ADMIN_SCRIPTS_HOME
b) adoacorectl.sh stop ( for stopping oacore services)

c) adoacorectl.sh start ( to start oacore services)

o Verify the Page

Log out and Login to the application.

Now we notice that the custom controller is taking effect and the “Social
Security” field has become mandatory.

You might also like