1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    0
    nitrox83 is on a distinguished road

      0  

    Default Datastore with complex JSONObjects

    Datastore with complex JSONObjects


    How can i extract complex object from a datastore to another datastore?

    My Json data sample as below:

    {"data": [{"listName":"List 1","listItems":[{"item":"Item 1","Quantity":2},{"item":"Item 2","Quantity":4},{"item":"Item 3","Quantity":5}]}]}

    I want to display the above in a fieldset with 1 textfield for the listName and a grid for the listItems, therefore I had managed to read the above data into 1 datastore.

    I was thinking of how I can extract the listItems from the first datastore into another datastore.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,917
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You can copy data to the other store like:

    Code:
    // main app store
    var mainStore = new Ext.data.Store({
    });
     
    // loader store for new data; append records to main
    var loadStore = new Ext.data.Store({
    	listeners: {
    		'load': function(store, records, successful) {
    			mainStore.loadData(records,true); // append records to main
    	}
    });
    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    0
    nitrox83 is on a distinguished road

      0  

    Default


    Thanks got it working

Thread Participants: 1

Tags for this Thread

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