1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    59
    Vote Rating
    0
    Nicodemuz is on a distinguished road

      0  

    Default How to load data to multiple stores with one request in Sencha Touch?

    How to load data to multiple stores with one request in Sencha Touch?


    Hi,

    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!
    http://stackoverflow.com/questions/5...n-sencha-touch

  2. #2
    crysfel's Avatar
    Join Date
    Feb 2008
    Location
    New York, USA
    Posts
    216
    Vote Rating
    8
    crysfel will become famous soon enough

      0  

    Default


    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

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    Glasgow, Scotland
    Posts
    293
    Vote Rating
    5
    Stuart-SwarmOnline will become famous soon enough

      0  

    Default


    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:
    http://www.sencha.com/forum/showthre...ch-with-Direct
    http://www.sencha.com/forum/showthre...565-Ext-Direct

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

Similar Threads

  1. Replies: 10
    Last Post: 20 Jan 2012, 10:10 AM
  2. Exception handling in Sencha Touch Stores
    By babar.sajjad in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 23 Apr 2011, 6:54 AM
  3. Request: A Simple Sencha Touch App's Source
    By tmanderson in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 27 Mar 2011, 3:13 PM
  4. Best way to use stores in sencha touch.
    By babar.sajjad in forum Sencha Touch 1.x: Discussion
    Replies: 13
    Last Post: 24 Jan 2011, 6:40 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi