Results 1 to 3 of 3

Thread: Ajax proxy troubleshooting help needed.

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
      0  

    Default Ajax proxy troubleshooting help needed.

    I've got a strange problem where an ajax proxy request succeeds and the data from the server shows up in the operation, but not the store and the store records array is empty.

    How do I go about troubleshooting this?

    I tried stack traces, looking at the Sencha Touch code, using console.log dumps of the model, proxy and store and can't find the problem.

    Thanks

    Code:
    records: [ ]
    
    Operation:
    _action: "read"
    ...
    _response: Object
      getAllResponseHeaders: function () {
      getResponseHeader: function (header) {
      request: Object
      requestId: NaN
      responseText: "{"metaData":    {"success":true,"total":1,"rootProperty":"item"},"item": ...
      responseXML: null
      status: 200
      statusText: "OK"
    Here's the straightforward store.load():
    Code:
    store.load({
        callback: function(records, operation, success) {
            // the operation object contains all of the details of the load operation
            console.log(records, operation);
        },
        scope: this
    });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    What does your reader look like?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    What does your reader look like?
    I just now figured it out. It turned out to be a rootProperty mismatch with my php response which is why it kept failing silently.

    Thanks
    Code:
                reader: {
                    type: 'json',
                        rootProperty: 'bills',
                },

Posting Permissions

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