I create a window containing grids that send off ajax requests. Now, I immediatley close the window again before the grids are fully created and the ajax requests return.
I have two problems:
- My components within a window are still "alive" after a window is destroyed
Chrome console lists them. Although my window has the autoDestroy: true
the gridpanel and store are still existing after the window is closed. When closed, the destroy
event is fired. Docs say, all components under the window should be destroyed.
- Then my callbacks finally return and get executed but the window is destroyed
The problem is, that the callbacks try to reconfigure a grid that has no more store attached.
Error: Uncaught TypeError: Cannot call method 'getCount' of null Table.js:500
(/lib/extjs/src/view/Table.js
How can I stop the callbacks from processing if my window is destroyed?