1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    fvinson is on a distinguished road

      0  

    Default data json store

    data json store


    I have a data store from json
    Code:
        //Data Composition Reaction
        Ext.define('ReactionCompoModel', {
            extend: 'Ext.data.Model',
            fields: [{name:'leftR',type:'string'},{name:'rightR',type:'string'}]    
        });
        var storeReactionCompo = Ext.create('Ext.data.JsonStore', {
            model: 'ReactionCompoModel',
            proxy: {
                type: 'ajax',
                url: '../php/datareactioncompo_v2.php',
                extraParams: {idReaction:0},
                reader: {type: 'json' }
            }
        });

    i want to recover the data
    Code:
               storeReactionCompo.proxy.extraParams.idReaction= idReaction;
               storeReactionCompo.load();
               console.log(storeReactionCompo.getById(leftR));
    the storeReactionCompo.load return :

    [{"leftR":"substrat1 + substrat2","rightR":"Product1 +Product2"}]

    storeReactionCompo.getById('leftR') give result : null
    storeReactionCompo.get('leftR')); give storeReactionCompo.get is not a function

    I don't anderstand ; How can i get the value substrat1 + substrat2 ?

    Thank you

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    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 use the following"

    Code:
    store.load({
    	callback: function(records, operation, success){
    		console.log(records);
    		console.log(records[0].get('name')); // multiple records; array based return
    	}
    });
    You can use convert to create calculated values or perform this at the server.
    http://docs.sencha.com/ext-js/4-1/#!...ld-cfg-convert

    Scott.

Thread Participants: 1

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