因为数据量较大,后台响应会比较慢,JsonStore调用load方法之后可能出现超时的情况,解决的办法很简单。
把创建JsonStore时的代码:myStore = new Ext.data.JsonStore({
url: "http://www.example.com/test.php",
...
});
改为:var myBigTimeout = 90000; // 90 sec
myStore = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: "http://www.example.com/test.php",
timeout: myBigTimeout
}),
//url: "http://www.example.com/test.php",
...
});
为EXt JsonStore设置设置timeOut
解决JsonStore加载超时
最新推荐文章于 2024-01-13 08:00:00 发布
本文介绍了一种解决Ext.data.JsonStore在大量数据下加载超时的问题,通过设置较长的超时时间,确保数据能够完全加载。

1008

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



