Oaf after downloading the attachment page expires, reported the browser back exception

Source: Internet
Author: User

After I use the download function, I add a row to the page or save it, and the page always reports the browser back exception.

Guess is because my download button uses the Submitbutton, it implicitly contains a submit action, and I have a commit action in the code, and after the download is completed there is a

Response.getoutputstream (). Flush ();

Response.getoutputstream (). Close ();

Operation, which causes the page to fail.

How to resolve:

Change the Submitbutton to a button, and then increase the Firepartialaction event.

Another: If the page is a variable, you need to add a button, and the code for it to add the event is as follows.

//Preview Audit reportsOacellformatbean Createpreviewcellbean= (Oacellformatbean) This. Createwebbean (PageContext, Oawebbeanconstants.cell_format_bean,NULL,NULL); Oabuttonbean Previewpdfbean=(Oabuttonbean) Createwebbean (PageContext, Oawebbeanconstants.button_bean,NULL, "Cuxpreviewpdfevent");p Reviewpdfbean.setid ("Cuxpreviewpdfbtn"); Previewpdfbean.setname ("Cuxpreviewpdfbtn"); String previewpdf= Pagecontext.getmessage ("Cux", "Cux_preview_pdf_file",NULL);p Reviewpdfbean.setlabel (previewpdf);p reviewpdfbean.settext (previewpdf); Hashtable apprhashtable=NewHashtable (1);//This event implicitly contains the submit action. //apprhashtable.put ("Cuxsuppcatemappingid",//New Oadataboundvalueviewobject (Cuxviewapprhisbean, "Suppitemcatemappingid", "Newsuppreqsea RCHVO "));//previewpdfbean.setfireactionforsubmit ("cuxpreviewpdfevent", NULL, Apprhashtable, True, true);//This event is equivalent to setting the Firepartialaction event on the button, and the Key,value in parameters is param_aucheaderid,{$AuctionHeaderId}Firepartialaction previewfirepartialaction =NewFirepartialaction ("Cuxpreviewpdfevent"); Parameter[] params =NewParameter[4];p arams[0] =NewParameter ();p arams[0].setvaluebinding (NewOadataboundvaluefireactionurl (Attrbidvaluebean, "{$AuctionHeaderId}"));p arams[0].setkey ("Param_aucheaderid");p Reviewpdfbean.setattributevalue (oawebbeanconstants.primary_client_action_attr,previewfirepartialaction) ; Createpreviewcellbean.addindexedchild (Previewpdfbean); Oarowlayoutbean Btnrowbean= (Oarowlayoutbean) webbean.findchildrecursive ("Buttonbarrow"); Btnrowbean.addindexedchild (Createpreviewcellbean);

Add Picture button Event

Oaimagebean Cuxviewapprhisbean = (Oaimagebean) Createwebbean (Pagecontext,oawebbeanconstants.image_bean,NULL,NULL); Cuxviewapprhisbean.setid ("Cuxviewapprhistory"); String Apprhierarchy= Pagecontext.getmessage ("Cux", "Cux_supp_inqure_app_his",NULL);        Cuxviewapprhisbean.setlabel (Apprhierarchy); Cuxviewapprhisbean.setsource (Oawebbeanconstants.apps_media_directory+ "Duplicate_enabled.gif"); Hashtable apprhashtable=NewHashtable (1); Apprhashtable.put ("Cuxsuppcatemappingid" ,                                   NewOadataboundvalueviewobject (Cuxviewapprhisbean, "Suppitemcatemappingid", "NEWSUPPREQSEARCHVO")); Cuxviewapprhisbean.setfireactionforsubmit ("Cuxapprovehistevent",NULL, Apprhashtable,true); Resultrnbean.addindexedchild (One, Cuxviewapprhisbean);

Oaf after downloading the attachment page expires, reported the browser back exception

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.