1. #11
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by miti View Post
    Consider you want jump to a record in a grid. The grid has huge number of records but we know the id of the record you want jump to. So we can make sure to get the record from server when prefetch the records for the buffered store.

    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.

  2. #12
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,366
    Vote Rating
    135
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    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.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #13
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    83
    Vote Rating
    2
    miti is on a distinguished road

      0  

    Default


    That works. Thanks Animal and dongryphon.

  4. #14
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    83
    Vote Rating
    2
    miti is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    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.
    I call store.guaranteeRange first (I know the position of the record). It used to work, I have not tested 4.2 yet...

    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.

  5. #15
    Sencha User
    Join Date
    Mar 2013
    Posts
    1
    Vote Rating
    0
    gordon881 is on a distinguished road

      0  

    Default


    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.

  6. #16
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    83
    Vote Rating
    2
    miti is on a distinguished road

      0  

    Default


    gordon881, your use case is very similar to mine

  7. #17
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,366
    Vote Rating
    135
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    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.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"