ext的store读取数据时,没有办法进行时间超时配置,只能通过代理方式,由connection来进行数据获取时间延长处理方式。
var connObj = new Ext.data.Connection({
timeout : 120000,
url : ‘/jsp/dataSourceURL’,
method : ‘POST’
});
var dataStore = new Ext.data.Store({
// load using HTTP
proxy : new Ext.data.HttpProxy(connObj),
reader : new Ext.data.JsonReader({
root : ‘rows’,
totalProperty : ‘results’
}, recordFormat)
});
参考文档http://rrishikesh.wordpress.com/2009/04/01/data-store-connection-timeout-in-extjs/
本文介绍如何在ExtJS中使用自定义连接对象解决数据加载超时问题,通过设置连接对象的超时属性,可以有效延长数据读取时间。
168万+

被折叠的 条评论
为什么被折叠?



