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();
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
And that’s done. Whenever the business logic gets fired, xxTrialCalledPG will be called from xxTrialCallingCO of xxTrialCallingPG.
Thanks for Learning.