Results 1 to 3 of 3

Thread: [SOLVED]Data Record get field value

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    263
    Vote Rating
    1
      0  

    Question [SOLVED]Data Record get field value

    See my code below ... When ds_oneproject.load(...) I got "rc_oneproject.get is not a function" within FB

    What I am doing wrong? Thanks

    Code:
    var rc_oneproject = new Ext.data.Record.create(    [
            {name: 'id_adonis', type: 'float'},
            {name: 'prjyear', type: 'float'},
            'prjno',
            'project_title', 
            'acronym', 
            'countryname',
            'mpartnr',
            'fcontrib',
            'mainobjective','abstract1','abstract2','methodology','mpartnraddress','mpartnrpobox','mpartnrpostcod','mpartnrpl','duration','assocpart','keywords','strands','strandcode','mpartnremail','mpartnrcity','prjwebsite','countrycode','mpartnrtelephone'
        ]);
    var rd_oneproject = new Ext.data.XmlReader({record: 'Report',id: 'id_adonis',totalRecords: '@total'}, rc_oneproject);
    var prox_oneproject = new Ext.data.HttpProxy({url:'qry/get/get_oneproject.cfm',method:'POST'});    
    var ds_oneproject = new Ext.data.Store({
        proxy: prox_oneproject,
        reader: rd_oneproject
    });
    ds_oneproject.on('load',function() {
    alert('loaded...' + rc_oneproject.get('id_adonis'));                         
    });

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    263
    Vote Rating
    1
      0  

    Default

    Code:
    ds_oneproject.on('load',function() {
    var tmp00000 = ds_oneproject.getAt(0); //I only retrieve one record has defined by the data definition
    alert('loaded...' + tmp00000.get('strands'));                         
    });
    This works better...

  3. #3
    Sencha User ppnectar's Avatar
    Join Date
    Mar 2013
    Location
    Ahmedabad, India
    Posts
    15
    Vote Rating
    4
      0  

    Default

    Hi,

    record.get('value') & record.data.value, between them which code is faster to execute & how does they work in framework?

    Thanks,
    Piyush Dholariya

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •