Monday 27 July 2020

How to pass parameter from one page to another in oaf

How to pass parameter from one page to another in oaf

Hi Friends, We are going to discuss about how to pass parameter from one page to another in oaf. In OAF , We do navigate from one oaf page to another. In Page navigation , We also need to set some default values in the destination page to execute some function or for some other purposes. OAF helps us to pass values in parameters from one page to another. We can pass multiple values in the form or Page parameters and can pass from one page to another page in OAF. This really helps to navigate between oaf web pages and carry values from one page to another. To pass parameters in OAF , we need to use some set of code and that we called "HashMap". This helps to pass parameters from one page to another in oaf. Please find below the detail about How to pass parameter from one page to another in oaf.

Working Example to pass parameter from one page to another in oaf

Step1:- I am sharing the main set of code and the steps to implement the parameters code in OAF.  I assume , we all are familiar with OAF initial steps for any set of oaf development. If you need more help , can refer my old blog posts.


Step 2:-

For Example, Here below is the OAF page form which we will be navigate to another Oracle Forms Page. We want to pass values from this page to our destination Oracle Forms page.
How to pass parameter from one page to another in oaf
How to pass parameter from one page to another in oaf
Step 3:-
Here below is the page , which will be open while we will click on the above OAF page 'Responsibility Form'  Page.

/xxelng/oracle/apps/per/hiring/webui/XXConfermationPG
How to pass parameter from one page to another in oaf
How to pass parameter from one page to another in oaf

Step 4:- Now , We need to know the path of this above page.To know the path , Please follow these below steps.

For this we need to go to 'About this Page' in the Bottom of the Page.
How to pass parameter from one page to another in oaf
How to pass parameter from one page to another in oaf


Step 5:- Here below is the Highlighted Page url as below.
/oracle/apps/ap/oie/webui/HomePG

How to pass parameter from one page to another in oaf
How to pass parameter from one page to another in oaf


Now We need to goto our OAF Page Controller. 

Under OAF Controller , We need to write this below code under the Process From Request Method.

super.processFormRequest(pageContext, webBean);
   
    OAApplicationModule am = pageContext.getApplicationModule(webBean);

HashMap vhashMap = new HashMap(1);
vhashMap .put("ParamName1", "Test Value");

oapagecontext.setForwardURL("OA.jsp?page=/oracle/apps/ap/oie/webui/HomePG",
                                      null,
                                      OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                      null, vhashMap , true,
                                      OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                                      OAWebBeanConstants.IGNORE_MESSAGES);



In the Destination OAF Page , If we want to retrieve this parameter in processRequest() via:

super.processRequest(pageContext, webBean);
   
  OAApplicationModule am = pageContext.getApplicationModule(webBean);


oapagecontext.getParameter("ParamName1");



How to pass parameter from one page to another in oaf

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *