PDA

View Full Version : Buffered Store not removing load mask



KajaSheen
24 May 2012, 12:45 AM
I am working on putting together a simple example to show my problem, but for now maybe somebody has some tipps how to resolve it.

I really like the inifinite grid, as it save space not having a paging bar. I now have two grids on my page. The first would, for example, show all divisions of my company. A second is loaded when a division is clicked and shows all the people working there. Now I of course have two stores. One configured to load divisions, the second one is by default configured to load all workers, but gets reconfigured on the fly to load only specific team members, I do this by reconfiguring the proxy to add the team id to the query.

Now using simple paging grids all is working fine. But now I tried to switch to a buffered store to allow for inifinite scolling. The division store loads fine (even using store.load()). But when calling either store.load() or store.prefetch() on the second store and there are only a few results the loading mask of the grid never disappears. And if there are a lot of results it loaded all the possible results, without stopping.

Any ideas would be appreciated!

KajaSheen
24 May 2012, 4:39 AM
Ok, not sure if this is a bug, but the following seems to happen, when loading the store BEFORE reconfiguring the grid, it doesn't work, when loading after reconfiguring the grid it seems to work as expected.

The following is pseudo-code:

var grid = WorkerGrid;
var store = Ext.create('WorkerStore');

//change the api
[...]

//DOES NOT WORK
store.load();

grid.reconfigure(store);



var grid = WorkerGrid;
var store = Ext.create('WorkerStore');

//change the api
[...]

//DOES WORK
grid.reconfigure(store);

store.load();

scottmartin
24 May 2012, 2:52 PM
You need to call reconfigure first, then load the store that is tied to the grid.

Regards,
Scott.