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