In OAF development sometimes a lot of pages will go to call a detail page, after looking at the details we need to jump to the page to enter this page, of course, we can use the way to transfer the parameters of the source page with the design of the unified parameters to the detailed page and then do the processing, But the better thing is to use the OAF framework to implement something of its own. Oabreadcrumbsbean set addbreadcrumb=y in the page jump or the second-to-last parameter in the Setforwardurl method is set to Oawebbeanconstants.add_bread_crumb_ When yes, the navigation path is recorded and displayed in the upper-left corner of the page. (Note: In general to enter a function of the query page to add the above parameters). Next we use the code in the Processformrequest method of the Co in the detail page to get the source 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);
}
The test needs to be done on the server.