View Full Version : Moving elements from one store to another

23 Oct 2013, 2:15 AM
Hi, lets imagine an app that use a localstorage store to receive input from the user while it is kep from session to session in the browser and at some point I want to pass all elements int another store, a store using ajax.

What are the methods to get all elements from a local store and the load() equivalent to inflow the local to the ajax?

Regards, Carlos

Gary Schlosberg
25 Oct 2013, 1:19 PM
Without knowing more about your data, seems like getRange (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-method-getRange) would be appropriate to collect the data and loadData (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-method-loadData) to put it in the new store.