Results 1 to 5 of 5

Thread: TypeError: record.unjoin is not a function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    30
    Answers
    1
    Vote Rating
    8
      1  

    Default TypeError: record.unjoin is not a function

    Getting error when loading store data After ajax request returning data.
    Error - TypeError: record.unjoin is not a function
    Here is my code -

    var invStore = Ext.data.StoreManager.lookup('invoice');
    var rec = Ext.decode(response.responseText);
    invStore.loadData(rec);

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,154
    Answers
    87
    Vote Rating
    34
      0  

    Default

    Check the rec after decode. Is it an array?
    And you could try to use loadRawData if the data is not an array of models.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    30
    Answers
    1
    Vote Rating
    8
      0  

    Default

    Here is my data - and loadRawData also not working.

    Load.png

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    30
    Answers
    1
    Vote Rating
    8
      1  

    Default

    My Bad.
    I should use -

    var rec = Ext.decode(response.responseText).records;
    invStore.loadData(rec);

    That works.

    Thank you

  5. #5
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,154
    Answers
    87
    Vote Rating
    34
      0  

    Default

    you should put in the record array part not the rec object..

Tags for this Thread

Posting Permissions

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