Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

Contact Us

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

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.

first_page_properties_param_article9.png

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.

second_page_properties_param_article9.png

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:

result_on_load_param_article9.png

On button click - navigates to Second page with parameters:

 


Roopa jetR

Add comment


Security code
Refresh

About the Author

Roopa jetR

Roopa jetR is an budding OAF developer.

LinkedIn contact: https://www.linkedin.com/in/roopajetR

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Jun 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
   1  2  3  4  5  6
  7  8  910111213
14151617181920
21222324252627
282930    

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner