Oracle OAF: Forward to a new page

This code requires you to setup a new function with name XXX_CUSTOM_PAGE, specify the complete path and assign this function to your responsibility.

String AuctionHeaderId = ReqRow.getAttribute("AuctionHeaderId").toString();
String BidNumber = ReqRow.getAttribute("BidNumber").toString();

HashMap hm = new HashMap(2);
hm.put("AuctionHeaderIdParam", AuctionHeaderId.toString());
hm.put("BidNumberParam", BidNumber.toString());

pageContext.setForwardURL("XXX_CUSTOM_PAGE", KEEP_MENU_CONTEXT, null,
hm, false, ADD_BREAD_CRUMB_YES, IGNORE_MESSAGES);

Note: e.g. Function: XXX_CUSTOM_PAGE -> Web URL: OA.jsp?page=/oracle/apps/fnd/toolbox/samplelib/webui/processPG

Note 2: how to get parameter from the new page: Assume that “ReadOnlyParam” is passed through the controller of the previous page:

      String s5 = pageContext.getParameter("ReadOnlyParam");  

      if(s5!=null && s5.equals("true")){

          //make reference read-only:
          OAPageLayoutBean pageLayout = pageContext.getPageLayoutBean();
          OAQueryBean query=(OAQueryBean)pageLayout.findChildRecursive("QueryRN");
          OATableBean table=(OATableBean)query.findChildRecursive("ResultsTable");
          OAMessageTextInputBean bean = (OAMessageTextInputBean)table.findChildRecursive("Comments");
          bean.setDisabled(true);

          //make save button rendered=false:
        OAMessageComponentLayoutBean mainRN =(OAMessageComponentLayoutBean )pageLayout.
findChildRecursive("MainRN");
       ((OASubmitButtonBean)mainRN.findChildRecursive("Save")).setRendered(false);        
 }

Note 3: You can use this annotation for a link: {@AuctionHeaderID}

Leave a Reply