View Full Version : How to load data to multiple stores with one request in Sencha Touch?

22 Mar 2011, 11:45 PM

I'm developing a Sencha Touch application that has multiple data stores. In order to improve performance, I would like to load the data to these stores in a single HTTP request.

For this to work, the server would output different JSON root elements, one for each store. How can this be done in Sencha Touch?

Any advice would be much appreciated. I've also posted this on Stack Overflow if you'd like to get some extra reputation points! :)

23 Mar 2011, 1:06 AM
You should make an "Ext.Ajax.request()", in the success config you need to decode the json, after that you need to add the records to the store that you need.

I hope that helps.

Best regards

23 Mar 2011, 1:51 AM
This is a prime candidate for Ext.Direct. However it's not officially supported at the moment but is planned to be once Ext4 is out the door.

Check out these threads:

However, in the meantime crysfel's way is probably the best way to do it.