ferr
6 Feb 2008, 3:56 PM
I've run into a situation where I need to load information into a grid using multiple data stores. I decided to use renderer for the particular column that required the information from an alternative store. The problem I am having is that since the data store must load on a per-render basis, it seems that every new call to the server-side cancels out the previous call.
Basically the situation is like this: Grid Column X requires information related to Row N-M which must be derived from Data Store A. Grid Column X has a renderer function that supplies record information from Data Store A in order to 1) load Data Store B based on record information and 2) render Column X based on information retrieved from Data Store B. Grid Column X's renderer function is called for each row.
and the 'load Data Store B' part is failing. All but the last say "Loading" in Firebug response, while the last one loads fine.
It seems that Ext.data.Store only allows for one load at a time, and I'm starting to understand a bit more about what the problem is as I write this.. it needs some sort of sleep/delay/wait method while it is loading when load is called in order to perform correctly, since I have no control over when the renderer fires (right..?).. any ideas? Is this something I can solve through ExtJS, or is there some other JS functionality I can use.. I did try setTimeout earlier, but it didn't work, I may need to look more into that, though. Or maybe I'm just going about loading this information in a completely ass backwards way and I should go about a different method.
Basically the situation is like this: Grid Column X requires information related to Row N-M which must be derived from Data Store A. Grid Column X has a renderer function that supplies record information from Data Store A in order to 1) load Data Store B based on record information and 2) render Column X based on information retrieved from Data Store B. Grid Column X's renderer function is called for each row.
and the 'load Data Store B' part is failing. All but the last say "Loading" in Firebug response, while the last one loads fine.
It seems that Ext.data.Store only allows for one load at a time, and I'm starting to understand a bit more about what the problem is as I write this.. it needs some sort of sleep/delay/wait method while it is loading when load is called in order to perform correctly, since I have no control over when the renderer fires (right..?).. any ideas? Is this something I can solve through ExtJS, or is there some other JS functionality I can use.. I did try setTimeout earlier, but it didn't work, I may need to look more into that, though. Or maybe I'm just going about loading this information in a completely ass backwards way and I should go about a different method.