1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    1
    Vote Rating
    0
    voloflip is on a distinguished road

      0  

    Question Unanswered: Data Store Load Issue

    Unanswered: Data Store Load Issue


    I have the following problem, when I populate my Store via AJAX call to the page that returns JSON, it gets populated with empty records. For example in Firebug for Ext.util.MixedCollection I see 108 records; all empty. Should be just one. Code example:

    Ext.regModel('Stuff', {
    fields: ['sfirstName', 'slastName', 'playNumber', 'sEmail', 'sPhone']
    });

    Stuff = new Ext.data.Store({
    model: 'Stuff',
    proxy: {
    type: 'ajax',
    url: '/Stuff',
    reader:
    {
    type: 'json',
    root: 'records'
    }
    }
    });

    JSON response: {"records":"[{\"sfirstName1\":\"John\",\"slastName1\":\"UserName1\",\"sEmail1\":\"FirstName1@test.com\",\"sPhone1\":\"(248) 232 2322\"}]"}

    Any ideas? THX!

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Vote Rating
    0
    Answers
    5
    sissonb is on a distinguished road

      0  

    Default


    Looks like the server is escaping the quotes in the JSON when it shouldn't.

    Paste that JSON into http://jsonviewer.stack.hu/ and then go to the viewer tab to see the structure issue.

Thread Participants: 1

Tags for this Thread