You are on page 1of 6

DIFFERENT METHOD TO PASSING PARAMETER:

1. Token:

Vname={@AttributName}

2. Hash Map:

HashMap variablename=nre Hashmap() ;

Variablename.add(“parameter name”,”parameter value”);

3.throughSession

pageContext.putSessionvalue(“parameter name”,”parameter value”) ;

OAF PASSING PARAMETERS FROM ONE PAGE TO


ANOTHER
 

Details
Written by 
Category: Oracle Application Framework
Published: 11 March 2015
Oracle Application Development Framework OAF paramter parameter passing page redirect pass paramter form one

page to another

User Rating: 5 / 5
Vote 5 Rate
PLEASE RATE            
fShare

Tweet

inShare4
We have seen the Javascript Popup article on opening and passing parameters onto a OAF page in a
popup window. Now, let us see as how to pass parameters on redirection from one page to another.
Requirement: To open popup window from an OAF screen
Step 1: Create a new OA workspace and OA project
Create a OA workspace with file name as: Param
Create a OA project with file name as: Param
Default package: oaf.oracle.apps.fnd.Param
Once your project is created, double click on Popup project and select Project content.
Click on 'Add' button next to the bottom pane in the Project content and select only that package which
you want have in your project.
Click OK and save your project.

 
 
Step 2: Create a ADF Business component - Application Module AM
Right click on Param project -> click New -> select ADF Business components -> select Application
Module
Package: oaf.oracle.apps.fnd.param.server
AM Name: ParamAM
Check Application Module Class: ParamAMImpl Generate Java File(s)
Step 3: Create a OA Components page
Right click on Param project -> click New -> select OA components under Web Tier -> select Page
Package: oaf.oracle.apps.fnd.param.webui
Page Name: FirstPG
Step 4: Set Page properties
Select on the FirstPG page and go to structure pane where a region of type 'pageLayout' and ID 'region1'
is automatically created.
Click on region1 in structure page and set the project properties as in the below screenshot - set all the
properties except the controller class, for now.

Step 5: Set new Controller


Select PageLayoutRN in the structure pane -> Right click on it -> Set new controller
Package: oaf.oracle.apps.fnd.popup.webui
Controller name: FirstCO
This automatically sets the controller class property in FirstPG page properties
Step 6: Create a button
Select PageLayoutRN in the structure pane -> Right click on it -> New -> Item
Item ID -> button
Item Style -> submitButton
Prompt -> Go to Page 2
Step 7: Create Second page
Right click on Param project -> click New -> select OA components under Web Tier -> select Page
Package: oaf.oracle.apps.fnd.param.webui
Page Name: SecondPG
Step 8: Set Page properties
Select on the SecondPG page and go to structure pane where a region of type 'pageLayout' and ID
'region1' is automatically created.
Click on region1 in structure page and set the project properties as in the below screenshot - set all the
properties except the controller class, for now.

Step 9: Set new Controller


Select PageLayoutRN in the structure pane -> Right click on it -> Set new controller
Package: oaf.oracle.apps.fnd.param.webui
Controller name: SecondCO
Step 10: Create a text element
Select PageLayoutRN in the structure pane -> Right click on it -> New -> Item
Item ID -> text
Item Style -> staticStyledText
Step 11: Capture button click event in FirstCO
Add the code in the following Process Form Request Function in your FirstCO as in the below screenshot
   HashMap hashMap = new HashMap(); // to put parameters to passed onto 2nd
page
   hashMap.put("param1","Hello ");
   hashMap.put("param2","World!");
   
     if(pageContext.getParameter("button")!=null){
         pageContext.setForwardURL("OA.jsp?
page=/oaf/oracle/apps/fnd/param/webui/SecondPG",
         null,
         OAWebBeanConstants.KEEP_MENU_CONTEXT,
         null,
         hashMap,
         true,
         OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
         OAWebBeanConstants.IGNORE_MESSAGES);
     }
Step 12: Get parameters in SecondCO
Add the code in the following Process Request Function in your SecondCO as in the below screenshot

   String param1 = pageContext.getParameter("param1"); //get passed parameters


   String param2 = pageContext.getParameter("param2");
   
   OAStaticStyledTextBean text =
(OAStaticStyledTextBean)webBean.findChildRecursive("text");
   text.setText(pageContext,param1+param2);
Result:
On page load:

On button click - navigating to Second page with parameters:

You might also like