chsboy 2009-09-10 11:01 采纳率: 0%
浏览 350
已采纳

ext登录进度框waitMsg效果时间如何延长?

用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]

  • 写回答

5条回答 默认 最新

  • iteye_20589 2009-09-10 13:41
    关注

    getForm().submit
    submit action的快捷方式
    参数:
    options : Object
    The options to pass to the action (see doAction for details)
    就是form 的action吧。你看看API吧。。
    [code="java"]var form = loginform.getForm().submit(

    {

    waitTitle : '请稍候',

    waitMsg : '正在登录......',

    timeout:60,//这里不能加timeout么?
    .....[/code]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?