• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / OAF Miscellaneous / How to call an OAF page from another OAF page with parameters?

How to call an OAF page from another OAF page with parameters?

October 27, 2012 by techhoneyadmin

Well, this is a very frequent requirement that OA Framework often have to fulfill and it’s really not very difficult to achieve.

In this post we deal with the calling of an OAF page when we have to pass parameter(s) from the calling OAF page to called OAF page

Here I assume that
A. We already have created one OAF page xxTrialCallingPG which will be the calling page
B. The location of the xxTrialCallingPG is /oracle/apps/demo/calling/xxTrialCallingPG
C. We already have created one more OA Framework page xxTrialCalledPG which will be called
D. The location of the xxTrialCalledPG is /oracle/apps/demo/called/xxTrialCalledPG
E. We have a controller attached to xxTrialCallingPG as xxTrialCallingCO

In order to pass parameters from xxTrialCallingPG to xxTrialCalledPG, we shall put these parameters in a HashMap using the code mentioned below.

HashMap xxTrialHashMap = new HashMap();
xxTrialHashMap.put(paramName1,paramValue1);
xxTrialHashMap.put(paramName2,paramValue2);

and so on.

Now, depending upon our business logic we can write the following code in the processFormRequest() method of xxTrialCallingCO

pageContext.setForwardURL(“OA.jsp?page=/oracle/apps/demo/called/xxTrialCalledPG”,// page name with complete path or called as target page
null, // not necessary with KEEP_MENU_CONTEXT
OAWebBeanConstants.KEEP_MENU_CONTEXT, // no change to menu context
null, // No need to specify since we’re keeping menu context
xxTrialHashMap, // request parameters
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
OAWebBeanConstants.IGNORE_MESSAGES);

And that’s done. Whenever the business logic gets fired, xxTrialCalledPG will be called from xxTrialCallingCO of xxTrialCallingPG.

Thanks for Learning.

Filed Under: OAF Miscellaneous Tagged With: Calling an oaf page from another oaf page, calling one oaf page from another, how to call an oaf page from another oaf page, one oaf page calling another

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in