ext 弹窗提交之后 不论成功还是失败都刷新本页面

ext 弹窗提交之后 不论成功还是失败都刷新本页面

问题描述:

// 创建或更改审核不通过信息
ast.feiliao91.admin.certification.certificationFailLog = function() {
var form = new ast.feiliao91.admin.certification.UpdateInfoForm({});
var win = new Ext.Window({
id : "certificationfaillog",
title : "请选择审核不通过原因",
width : 557,
resizable:false,
height : 144,
modal:true,
items : [ form ]
});
win.show();
}

ast.feiliao91.admin.certification.UpdateInfoForm = Ext
.extend(
Ext.form.FormPanel,
{
targetGrid : null,
constructor : function(config) {
config = config || {};
Ext.apply(this, config);
var form = this;
var c = {
defaults : {
labelSeparator : " ",
},
items : [ {
layout : "form",
items : [
{
xtype : "radio",
name : "failResonSearch",
inputValue : "1",
boxLabel : "您上传的证件图片不清晰,请重新上传清晰的图片"
},
{
xtype : "radio",
name : "failResonSearch",
inputValue : "2",
boxLabel : "您上传的证件信息不齐全,请按样图标准上传图片"
},
{
xtype : "radio",
name : "failResonSearch",
inputValue : "3",
boxLabel : "您上传的证件图片不完整,请重新上传,请耐心等待图片加载完整后再提交"
} ]
} ],
buttonAlign : "right",
buttons : [ {
text : "保存",
handler : function(btn) {
if (form.getForm().isValid()) {
form
.getForm()
.submit(
{
url : Context.ROOT
+ Context.PATH
+ "/admin/certification/certificationFailLog.htm?companyId="+id,
method : "post",
type : "json",
success : function() {
Ext.MessageBox.show({

title : Context.MSG_TITLE,
msg : "信息已审核",
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.INFO
});
win.hide();
},
failure : function() {
Ext.MessageBox.show({
title : Context.MSG_TITLE,
msg : "发生错误,信息未审核",
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.ERROR
});
}
});
} else {
Ext.MessageBox.show({
title : Context.MSG_TITLE,
msg : "验证未通过",
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.ERROR
});
}
}
} ]
}
ast.feiliao91.admin.certification.UpdateInfoForm.superclass.constructor
.call(this, c);
}
})

已经解决:
Ext.getCmp("certificationfaillog").close();
grid.getStore().reload();