OAF jump back from the details page to view the original page

  In OAF development will be to call a detail page, after you finish viewing the details need to jump to this page to enter the page, of course, can be used to pass parameters to pass the way the source of the page with unified parameters designed to do the deal detail page but better is to use the OAF own framework to achieve some things. OABreadCrumbsBean addBreadCrumb = Y provided at the second to last page jump or parameter arranged in setForwardURL OAWebBeanConstants.ADD_BREAD_CRUMB_YES when the recording process will navigation route and upper left corner of the page. Next we processFormRequest methods detailed in the pages of CO is used to obtain the source code for the page and then jump back.

if(pageContext.getParameter("returnBnt")!=null){
  String url="";
  OARenderingContext context = pageContext.getRenderingContext();
  OABreadCrumbsBean crumb =null;   
  if (webBean instanceof OAPageLayoutBean)
  {
     crumb=((OABreadCrumbsBean)((OAPageLayoutBean)webBean).getBreadCrumbsLocator());
  }
  if(crumb != null)
  {
     MessageHelp.coOutputStringMessage(pageContext,crumb.getIndexedChildCount(context)+"");
     int count=crumb.getIndexedChildCount(context)-2;
     if(count>=0){
         OALinkBean tLink = (OALinkBean)crumb.getIndexedChild(context,count);           
         url=tLink.getDestination().replaceAll("retainAM=N","retainAM=Y");
         if(url.contains("OA.jsp?page=/cinda/oracle/apps/xxt/welfare/webui/ImportPG")){
           url="OA.jsp?page=/cinda/oracle/apps/xxt/welfare/webui/WelfareHeadPG";     
         }
         url=url.substring(url.indexOf("OA.jsp?"));                
      }else{
         url="OA.jsp?page=/cinda/oracle/apps/xxt/welfare/webui/WelfareHeadPG";              
      }      
   }else{
      url="OA.jsp?page=/cinda/oracle/apps/xxt/welfare/webui/WelfareHeadPG";
   } 
   am.invokeMethod("reQuery");
   pageContext.setForwardURL(url,
                             null,
                             OAWebBeanConstants.KEEP_MENU_CONTEXT,
                             null, null, true,
                             OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
                             OAWebBeanConstants.IGNORE_MESSAGES);    
}

 

Guess you like

Origin www.cnblogs.com/AI-xiaocai/p/11648296.html