Results 1 to 3 of 3

Thread: Model.Load Question

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Dublin, California
    Posts
    21
    Vote Rating
    1
      0  

    Default Model.Load Question

    I have a question in regards to model.Load(). In all the examples I have seen there is always a callback function or success function that passes a parameter my question is this parameter is never defined in the examples I have seen. Can someone clarify this? In this callback function for example the parameter book is neverdefined. Is it the root of the returned data? I have been trying to model my app according to these examples in architect2 but everytime the data is loaded the parameter is undefined as shown in firebug.

    Book.load(1, {
    callback: function(book, operation){
    console.log(book);
    }


    Last edited by drgaryholland; 13 Jan 2013 at 11:09 AM. Reason: typo correction

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    book should be an instance of a model...

    http://docs.sencha.com/ext-js/4-1/#!...ic-method-load

    Perhaps try the success callback? Do you see the request going across the wire? What is the response?
    Aaron Conran
    @aconran

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Dublin, California
    Posts
    21
    Vote Rating
    1
      0  

    Default My problem was the json reader and the record config. Json is the default

    After I removed the reader, the callback function executed and book was defined....Thanks.

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
  •