Originally Posted by miti
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.
The above is what you would find in the latest nightly builds on the support portal and will be in the 4.2.1 release.
That works. Thanks Animal and dongryphon.
I call store.guaranteeRange first (I know the position of the record). It used to work, I have not tested 4.2 yet...
Originally Posted by Animal
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.
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.
gordon881, your use case is very similar to mine ;)
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. :)