用ext的登录框会有一个正在登录的进度框的waitMsg的效果,由于我在login.action里有一个初始化数据库连接池的工作,因此这个login执行时间会比较长,当后台还在执行,前台也显示登录失败,可不可以把这个进度框执行的时间变长那,还有一个原因可能时login会话连接时间过长被服务端关闭了,firedug显示这个action用了30s
[b]问题补充:[/b]
to 各位: var form = loginform.getForm().submit(
{
waitTitle : '请稍候',
waitMsg : '正在登录......',
success : function() {
//alert("login success");
window.location = path;
},
failure : function() {
Ext.MessageBox.alert('信息', '登陆失败,请与管理员联系!');
}
}
);
我就是这样用的,没这么复杂吧
[b]问题补充:[/b]
to Rowen:我的action,是form的action,没法设timeout的。[code="java"]
var loginform = new Ext.FormPanel({
labelAlign : 'right',
title : 'ixcom通信中间件 v3.5 ',
buttonAlign : 'right',
width : 260,
frame : true,
url : path+"login.do",
plain : true,
defaultType : 'textfield',
labelWidth : 50,
labelSeparator : ':',
bodyStyle:'padding:3px 3px 0',
items : [{
cls:'user',
fieldLabel : '帐号',
name : 'username',
width:130,
allowBlank : false
}, {
cls:'key',
fieldLabel : '密码',
name : 'userpassword',
inputType : 'password',
width:130,
allowBlank : false
}],
buttons : [
{
text : '登陆',
handler : function() {
var form = loginform.getForm().submit(
{
waitTitle : '请稍候',
waitMsg : '正在登录......',
success : function() {
//alert("login success");
window.location = path;
},
failure : function() {
Ext.MessageBox.alert('信息', '登陆失败,请与管理员联系!');
}
}
);
}
}, {
text : '重置',
handler : function() {
loginform.getForm().reset();
}
}]
})
[/code]