OAF中下载附件之后页面失效,报过时的数据异常,浏览器后退异常
我在使用了下载功能之后,再往页面添加行或进行保存,页面老是报浏览器后退的异常。
猜测是因为我的下载按钮使用的submitButton,它隐式的包含了一个submit动作,且我在代码中有一个Commit动作,而下载完成之后有一个
response.getOutputStream().flush();
response.getOutputStream().close();
操作,导致页面失效。
解决方式:
将submitButton改为button,再增加firePartialAction的事件即可。
另:如果是标准的页面,需要添加一个button按钮,且为其添加事件的代码如下。
//预览审核报告 OACellFormatBean createPreviewCellBean =(OACellFormatBean)this.createWebBean(pageContext , OAWebBeanConstants.CELL_FORMAT_BEAN , null , null);
OAButtonBean previewPDFBean =
(OAButtonBean)createWebBean(pageContext , OAWebBeanConstants.BUTTON_BEAN , null , "CuxPreviewPDFEvent");
previewPDFBean.setID("CuxPreviewPDFBtn");
previewPDFBean.setName("CuxPreviewPDFBtn");
String previewPDF = pageContext.getMessage("CUX" , "CUX_PREVIEW_PDF_FILE" , null);
previewPDFBean.setLabel(previewPDF);
previewPDFBean.setText(previewPDF);
Hashtable apprHashTable = new Hashtable(1);
//此事件会隐式的包含submit动作。
//apprHashTable.put("CuxSuppCateMappingId" ,
// new OADataBoundValueViewObject(CuxViewApprHisBean , "SuppItemCateMappingId" , "NewSuppReqSearchVO"));
//previewPDFBean.setFireActionForSubmit("CuxPreviewPDFEvent", null, apprHashTable, true, true); //此事件等价于在Button上设置了firePartialAction事件,且parameters中的key,value分别为param_AucHeaderId,{$AuctionHeaderId}
FirePartialAction previewFirePartialAction = new FirePartialAction("CuxPreviewPDFEvent");Parameter[] params = new Parameter[4];
params[0] = new Parameter();
params[0].setValueBinding(new OADataBoundValueFireActionURL(attrBidValueBean , "{$AuctionHeaderId}"));
params[0].setKey("param_AucHeaderId");
previewPDFBean.setAttributeValue(OAWebBeanConstants.PRIMARY_CLIENT_ACTION_ATTR,previewFirePartialAction);
createPreviewCellBean.addIndexedChild(previewPDFBean);
OARowLayoutBean btnRowBean =(OARowLayoutBean)webBean.findChildRecursive("ButtonBarRow");
btnRowBean.addIndexedChild(createPreviewCellBean);
添加图片按钮事件
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 = new Hashtable(1);
apprHashTable.put("CuxSuppCateMappingId" ,
new OADataBoundValueViewObject(CuxViewApprHisBean , "SuppItemCateMappingId" , "NewSuppReqSearchVO"));
CuxViewApprHisBean.setFireActionForSubmit("CuxApproveHistEvent" , null , apprHashTable , true);
ResultRNBean.addIndexedChild(11 , CuxViewApprHisBean);
Table添加列
OATableBean ResultRNBean =
(OATableBean)webBean.findChildRecursive("RegTableRN"); OAMessageStyledTextBean phoneBean =
(OAMessageStyledTextBean)createWebBean(pageContext,
OAMessageStyledTextBean.MESSAGE_STYLED_TEXT_BEAN,
null, "PhoneNumber");
phoneBean.setViewUsageName("NewSuppReqSearchVO"); //此列绑定的VO
phoneBean.setViewAttributeName("PhoneNumber"); //此列绑定的VO中的字段
phoneBean.setLabel("联系电话"); //此列需要显示的题头
ResultRNBean.addIndexedChild(9, phoneBean);
Table添加Switcher列
OASwitcherBean reviewSwitcherRN =
(OASwitcherBean)createWebBean(pageContext,
"/cux/oracle/apps/pos/onboard/webui/CuxSuppReqReviewSwitcherRN",
"reviewSwitcherRN", true);
if (ResultRNBean != null) {
ResultRNBean.addIndexedChild(12, reviewSwitcherRN);
}
标准删除按钮添加事件
OAImageBean DeleteBean =
(OAImageBean)webBean.findChildRecursive("Delete");
Hashtable deleteHashTable = new Hashtable(2);
deleteHashTable.put("mappingId",
new OADataBoundValueViewObject(DeleteBean,
"MappingId",
"NewSuppReqSearchVO"));
deleteHashTable.put("RegistrationStatus",
new OADataBoundValueViewObject(DeleteBean,
"RegistrationStatus",
"NewSuppReqSearchVO"));
DeleteBean.setFireActionForSubmit("CuxDelete", null, deleteHashTable,
true);
OAF中下载附件之后页面失效,报过时的数据异常,浏览器后退异常的更多相关文章
- OAF 中下载使用XML Publisher下载PDF附件
OAF doesn't readily expose the Controller Servlet's HttpRequest and HttpResponse objects so you need ...
- golang gin框架中实现"Transfer-Encoding: chunked"方式的分块发送数据到浏览器端
参考了这篇帖子: https://golangtc.com/t/570b403eb09ecc66b90002d9 golang web如何发送小包的chunked数据 以下是代码: r.GET(&qu ...
- EBS OAF中如何在多行表中实现附件功能
EBS OAF中如何在多行表中实现附件功能 (版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处:否则请与本人联系,违者必究) 在OAF中使用附件功能之前,要先明白Entity( ...
- vue Blob 下载附件报错
vue Blob 下载附件报错,不妨试试: window.location.href=后台地址
- 解决关于jquery中$.get()方法总是报“HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy”错的方法
解决关于jquery中$.get()方法总是报“HierarchyRequestError: Node cannot be inserted at the specified point in the ...
- 在Winform开发框架中对附件文件进行集中归档处理
在我们Winform开发中,往往需要涉及到附件的统一管理,因此我倾向于把它们独立出来作为一个附件管理模块,这样各个模块都可以使用这个附件管理模块,更好的实现模块重用的目的.在涉及附件管理的场景中,一个 ...
- Nginx 配置下载附件让浏览器提示用户是否保存
Nginx配置下载附件让浏览器提示用户是否保存 by:授客 QQ:1033553122 测试环境 nginx-1.10.0 问题描述: 前端页面,IE11浏览器下请求下载附件模板,针对xls ...
- OAF中多语言的实现(转)
正好前两天研究过这个问题,分享一下啊. 标题: OAF中多语言的实现概述: OAF的多语言的实现有两种方式,其一是直接通过页面上面的“个性化”连接,连接到指定的页面后,进行 ...
- java上传附件,批量下载附件(一)
上传附件代码:借助commons-fileupload-1.2.jar package com.str; import java.io.BufferedInputStream;import java. ...
随机推荐
- bzoj1645 / P2061 [USACO07OPEN]城市的地平线City Horizon(扫描线)
P2061 [USACO07OPEN]城市的地平线City Horizon 扫描线 扫描线简化版 流程(本题为例): 把一个矩形用两条线段(底端点的坐标,向上长度,添加$or$删除)表示,按横坐标排序 ...
- c++ 11和java 8都支持lambda表达式
c++ 11居然都支持lambda表达式了,看了这确实是有必要了. 具体可见http://www.cprogramming.com/c++11/c++11-lambda-closures.html
- Android 拖动条 和 Handle
- 06: Pymysql
1.1 Pymysql安装与简介 1.安装 pip3 install pymysql 2.介绍(支持python3) 1. pymsql是Python中操作MySQL的模块,其使用方法和MySQLdb ...
- 查看 nodejs 安装包的相关指令
npm -h 以上指令可以看到npm可用的指令 如果要卸载就用npm uninstall
- Android 实践项目开发二
在地图开发中项目中,我这周主要完成的任务是和遇到的问题是以下几个方面. 1.在本次的项目中主要是利用百度地图的.jar包实现地图的定位与搜索功能,需要在百度地图开发中心网站取得 密钥,并下载相关.ja ...
- Git 基础笔记整理1
Git 官网:http://git-scm.com/ git教程1:http://www.yiibai.com/git/home.html git教程2 :http://www.liaoxuefeng ...
- 文件IO和标准IO的区别【转】
一.先来了解下什么是文件I/O和标准I/O: 文件I/O:文件I/O称之为不带缓存的IO(unbuffered I/O).不带缓存指的是每个read,write都调用内核中的一个系统调用.也就是一般所 ...
- ubuntu下桌面假死处理方法(非重启)
一.背景 2018/05/22,就在这一天,进入ubuntu的桌面后随便点击任何位置均无法响应,此时又不想重启,遂出此文 二.解决方案 2.1 关掉Xorg进程 2.1.1按下ctrl+alt+F1进 ...
- thinkphp中的Ueditor的使用, 以及如何传递编辑器内容到后台?
在线编辑器有很多很多, 而且大多是开源的. uediotr基于mit协议, 开源, 可以用于商业和非商业的 任意使用和修改都可以 如果两个相连接的 相邻的 元素之间 因为边框重叠 而显得中间的边框线很 ...