27 Mar 2013 1:40 AM #11
- Join Date
- Mar 2007
- Notts/Redwood City
- Vote Rating
How are you going to do that in a buffered store?
A buffered store MUST only be asked to load pages into its cache. Not individual records.
If you know the page number into which a record which resides only on the server, and has NOT yet been pulled into the cache maps, then you can explicitly request that page.
But If a record is not in the page map, you cannot find it.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
27 Mar 2013 8:24 AM #12
27 Mar 2013 9:46 AM #13
That works. Thanks Animal and dongryphon.
27 Mar 2013 9:59 AM #14
Also, I see there is bufferedRenderer now. Do you think if I have a large number of records (tens of thousands), should I stay with buffered store or bufferedRenderer should be able to handle it? Thanks.
28 Mar 2013 1:59 AM #15
Hey, just wanted to say I was having a similar issue when upgrading to 4.2. Just wanted to give my use case to show there is a valid reason for wanting this kind of functionality for buffered stores.
In my app I have a buffered grid and a map with markers. The map and grid pull data from the same database table, but are sorted differently (the map shows objects within its current bounds, and the map show objects sorted by date) and as such have separate stores. The idea is that clicking an marker on the map would highlight the associated row in the grid.
To accomplish this, I first checked if the store for the grid contained the object from the map via store.find('id', myObject.id). If this returned -1 (the object isn't in the grid's store) then I would send the object id to my backend and ask it to tell me what page of data the object would be on. It would respond with a page number, and then I would simply go store.loadPage(response.pagenum); and when the page was loaded, ask it to highlight the row.
28 Mar 2013 8:20 AM #16
gordon881, your use case is very similar to mine
28 Mar 2013 9:58 AM #17
Thanks for the feedback and explanation there! That really helps because we cannot always imagine the clever ways these things get put to use in The Real World.