buttons: [{
text: 'Login',
handler: function (){
this.disabled = true;
formPanl.form.doAction('submit', {
url : '/Report/print/LoginServlet',
method : 'post',
// 如果有表单以外的其它参数,可以加在这里。我这里暂时为空,也可以将下面这句省略
params : '',
// 第一个参数是传入该表单,第二个是Ext.form.Action对象用来取得服务器端传过来的json数据
success : function(form, action) {
document.location = 'layout-browser.jsp'
},
failure : function(form, action) {
var json = action.response.responseText;
var o = eval("(" + json + ")");
Ext.Msg.alert('警告', o.message);
}
});
this.disabled = false;
}
}]
Ext Form 提交方法之一
最新推荐文章于 2015-10-19 00:22:50 发布