OAF Development Implement a page back when it came to the jump

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.