0

我从 extjs 3.3 提交表单。表单提交后,后端进程将运行近半小时。我需要向用户显示进度信息。消息将从服务器返回。我需要在进度条中显示服务器消息,直到该过程完成。

我当前的代码

Ext.getCmp('columnDetailInfoId').getForm().submit({
    url     : 'callAPIs', 
    timeout : 2000000,
    waitMsg : 'In-Progress...',
    params  : {selectedAppRowNo: Ext.encode(selectedAppRowNo)},

    success : function(){                                             
        Ext.MessageBox.show({
            title  : 'Info',
            msg    : 'process completed.',
            buttons: Ext.MessageBox.OK,
            icon   : Ext.MessageBox.INFO,
            animEl : 'mb9',
            width  : 400
        });
    },

    failure : function(form,action){
        var message = action.result.message;

        Ext.MessageBox.show({
            title  : 'Error',
            msg    : 'process Failed. Error Message:'+message,
            buttons: Ext.MessageBox.OK,
            icon   : Ext.MessageBox.ERROR,
            animEl : 'mb9',
            width  : 500
        });
     }
});

我需要显示进度条而不是等待消息。分享你的想法或代码来实现这个场景。

4

0 回答 0