`

ajax请求时间、数据加载

 
阅读更多

延长ajax的请求超时时间(默认为30秒)

1、Ext.data.Connection.prototype.timeout='9000';设置ajax请求时间默认30秒
2、Ext.Ajax.request({
timeout:300000,
});

 

一个ajax数据装载多个store

Ext.Ajax.request({
                url:'<%=WebConfig.WEB_ROOT%>/sys/listQueryDesktopMsg.jhtml',//后台取数据的地址
                success:function(response){
                    var responseJson = Ext.util.JSON.decode(response.responseText);
 
                        one.loadData(responseJson);//将后面(3)中的store1、store2的定义放在
                        two.loadData(responseJson);//Ext.Ajax.request之前
                        zero.loadData(responseJson);
                        see.loadData(responseJson);
                        no.loadData(responseJson);
                },
                failure:function(response){
                }
            });

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics