PDA

View Full Version : Example of syncing an ajax store to localStorage



bstras21
2 Dec 2011, 9:25 AM
Can some please provide an example of syncing an ajax store to localStorage. I can't seem to get it to work, thanks!

mitchellsimoens
2 Dec 2011, 9:39 AM
http://docs.sencha.com/touch/2-0/#!/api/Ext.data.proxy.LocalStorage

Remember we are still in the PR stages so expect a few bumps in the road.

bstras21
2 Dec 2011, 9:41 AM
I've been there multiple times, I'm looking for a working example someone may have, thanks.

riyaad
5 Dec 2011, 3:37 AM
This would really be of benefit to me too.
In particular when it comes to storing a user's settings for later use.

Thx

rdougan
5 Dec 2011, 10:04 AM
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.

riyaad
5 Dec 2011, 11:24 PM
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?

Möhre
13 Sep 2012, 12:48 AM
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/

(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.