-
12 Jan 2013 7:18 AM #1
Model.Load Question
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
-
14 Jan 2013 11:30 AM #2
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
Sencha Architect Development Team
-
25 Jan 2013 5:27 AM #3
My problem was the json reader and the record config. Json is the 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.


Reply With Quote