1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    27
    Vote Rating
    0
    Vinni is on a distinguished road

      0  

    Default recordType equivalent in ExtJS 4.1 API

    recordType equivalent in ExtJS 4.1 API


    Hi,

    Please let me know whats the equivalent for below recordType and Store in ExtJS 4.1 API.

    ExtJS 3.4
    Code:
    var recordType = new Ext.data.Record.create([
        {name: 'received', mapping: 'alarm-time'},
        {name: 'severity', mapping: 'alarm-class'},
        {name: 'description', mapping:'alarm-description'},
        {name: 'time-ms', mapping:'alarm-time/@junos:seconds'}
    ]);
    
    // reader
    var reader = new Ext.data.XmlReader({
        record: 'alarm-detail'
    }, recordType);
    
    var dataStore = new Ext.data.Store({
             allRecords : null,
             reader : reader,
             model: 'recordType',
             load : function(o){   }
    });
    ExtJS 4.1 - I tried below piece of code
    Code:
    Ext.define('recordType', {
        extend: 'Ext.data.Model',
        fields: [
            {name: 'received', mapping: 'alarm-time'},
            {name: 'severity', mapping: 'alarm-class'},
            {name: 'description', mapping:'alarm-description'},
            {name: 'time-ms', mapping:'alarm-time/@junos:seconds'}
        ]
    });
    
    var dataStore = Ext.create('Ext.data.Store', {     
    storeId: 'dataStore',     
    model: 'recordType',     
    proxy: {         
        type: 'memory',         
        reader: 'array'     }
        load : function(o){   } 
    });
    Thanks,
    Vinamra

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,803
    Vote Rating
    606
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    recordType is the model.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Apr 2010
    Posts
    27
    Vote Rating
    0
    Vinni is on a distinguished road

      0  

    Default


    I am already using model now but its giving error.
    Not sure if I am using ExtJS 4.1 API correctly.

    Thanks,
    Vinni

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