View Full Version : auto-reload stores cause error when store gets deleted

17 Jun 2010, 6:28 AM

I have a chart that draws data from a store, I'd like this chart to reload the store each 1-2 seconds and then refresh the chart. I did that with a task, setup my task to call a function and then reload the store. Now the problem I have with this method is that my chart is displayed only on some occasion, when it is no more needed (when the end-user move to another area) I delete the store but this creates a javascript error when done between the invocation of "reload" and the AJAX reception of the data because when the AJAX data is receive the object no more exists.

Is this a bug that on a AJAX request ext js do not check first that the object the call is related to still exists? Or is there a way to know that there is a pending ajax request for a store and post-pone the deletion of the store until the ajax request complete? (which will actually be wierd as a behavior as the user would click somewhere and have to wait before the UI change).

Yannick Koehler