View Full Version : How do i kill a request for a data store load call?

7 Jul 2010, 6:29 AM
I have a TabPanel where each one contains a grid with a data store.
On the first load/display of each tab a call is made to the server to obtain the data for the store.
If the user clicks on each tab lets say 5 tabs then there are 5 calls made to the server.
Sometimes the server just hangs and does not return any data.

So, how can I kill the request after lets say 30 seconds?

7 Jul 2010, 7:00 AM
You can specify a timeout in the store load options (default timeout already is 30 sec!).

30 Sep 2010, 10:18 AM

30 Sep 2010, 10:18 AM
Not documented. Not useable.

30 Sep 2010, 10:35 AM
I found a way to set it, but it's after initializing the store, not as a config property.

store.proxy.conn.timeout = 1; //milliseconds

30 Sep 2010, 10:47 AM
If it's a JsonStore you have to use a proxy and set the timeout on the proxy:

var myProxy = new Ext.data.HttpProxy({
url: "myserver/dataFeed.json",
timeout: 600000

var myGrid = new Ext.grid.GridPanel({
store: new Ext.data.JsonStore({
proxy: myProxy,
/* more configs */

30 Sep 2010, 11:02 AM

30 Sep 2010, 11:23 AM
The api docs arent always clear or complete. Sometimes you have to read source. Just because it's not specifically mentioned in the api docs doesn't mean it's not usable....

30 Sep 2010, 1:58 PM
I agree with you, CK, you can always fall back on the source. Documentation is what I'm trying to help with. Every time we run across something that isn't documented, someone somewhere has to put a flag on it, or we'll never have complete docs? I'm waiting for someone Ext-related to get this into the docs. The timeout should, then, be declarable on a store's config...

30 Sep 2010, 3:52 PM
ah I see. Agreed, all of their docs need looking into.