首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

showModalDialog 封锁本窗口,刷新父窗口

2012-10-27 
showModalDialog 关闭本窗口,刷新父窗口form methodpost namefom action${ctx}/bggl/bgsgl.do

showModalDialog 关闭本窗口,刷新父窗口

<form method="post" name="fom" action="${ctx}/bggl/bgsgl.do">
<input name="method" type="hidden" value="add" />

3.action
/**
* 保存治安档案记录
* @throws IOException
*/
public ActionForward add(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws IOException{
TmeZadajl jl = new TmeZadajl();
bindEntity(form, jl);
service.save(jl);
saveMessage2Session(request, "保存治安记录成功!");
return mapping.findForward("closeModelDiaglog");
}
4.配置
<!-- GlobalForwards -->
<global-forwards>
<forward name="openerReload"
path="/../jsp/common/openerReload.html" />
<forward name="parentOpenerReload" path="/../jsp/common/parentOpenerReload.html" />
<forward name="closeModelDiaglog" path="/../jsp/common/ncp/close_modeldiaglog.jsp" />
</global-forwards>

5.公共页 close_modeldiaglog.jsp
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ include file="/jsp/common/ncp/taglibs.jsp"%>
<%
/**
* 功能:用于关闭模态窗口,并且刷新父窗口
*/
%>
<logic:notEmpty name="customMessages">
<logic:iterate id="cMessage" name="customMessages">
<script type="text/javascript">
alert('<c:out value="${cMessage}" />');
window.dialogArguments.location.reload();
window.close();
</script>
</logic:iterate>
</logic:notEmpty>

???

热点排行