1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default Example of syncing an ajax store to localStorage

    Example of syncing an ajax store to localStorage


    Can some please provide an example of syncing an ajax store to localStorage. I can't seem to get it to work, thanks!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,592
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    http://docs.sencha.com/touch/2-0/#!/...y.LocalStorage

    Remember we are still in the PR stages so expect a few bumps in the road.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default Been there

    Been there


    I've been there multiple times, I'm looking for a working example someone may have, thanks.

  4. #4
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default


    This would really be of benefit to me too.
    In particular when it comes to storing a user's settings for later use.

    Thx

  5. #5
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This is really as simple as looping through each record in an Ajax store and adding them into a localStorage store, and vice versa. The problem is, that right now in PR2, localStorage is broken.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  6. #6
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default


    That's a shame. I'm busy developing an app using Sencha Touch (1.10) but as I'm still busy coding away I've migrated to PR2. Does anyone know the ETA on the localStorage solution for PR2. When is PR2 due for official release?

  7. #7
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    146
    Vote Rating
    10
    Möhre will become famous soon enough

      1  

    Default


    In this blog you will find an example:
    http://lalexgraham.wordpress.com/2012/09/12/sencha-touch-2-example-of-syncing-localstorage-store-with-remote-jsonp-proxy-store/

    It is more a "move it all" to localstorage than a record sync.