Results 1 to 4 of 4

Thread: what's the type of 'records' in callback(records,option,success) in json store.load

  1. #1
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Answers
    1

    Default what's the type of 'records' in callback(records,option,success) in json store.load

    Hi all,i tried to use the data(records) returned from the server,but dont know what type of the data is,my code is like below .seems it's an array,but i just cant use the its elements.
    Code:
    xxx.store.load(//json store
      {
       callback: function(records, options, success){
        this.reader.jsonData.groups.group1;//i can call it like this
        records.groups;//doesnt work
        records[0];//[object Object]
        records[0].group1;//undefined
        records.length==6//
       
       }
      }
    );
    data from server
    Code:
    {
     "groups" : {
     "group1" : "Week33",
     "group2" : "Week34",
     "group3" : "Week35",
     "group4" : "Week36",
      },
      "rows": [
       {
      "data1":"data"
       }
      ],
       "success" : true,
     "metaData" : null,
     "cacheName" : "",
     "totalRowCount" : 6 
    }

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347

    Default

    Records argument of loading callback is an array of Ext.data.Model or its sub-class.

  3. #3
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Answers
    1

    Default

    Quote Originally Posted by vietits View Post
    Records argument of loading callback is an array of Ext.data.Model or its sub-class.
    how to use it?

  4. #4
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Answers
    1

    Default

    sorry,im using ExtJs 3.x

Posting Permissions

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