1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Ahmedabad, Gujarat, india
    Posts
    12
    Vote Rating
    0
    vishal_sencha is on a distinguished road

      0  

    Default Answered: Sencha Touch can't load data into store using proxy

    Answered: Sencha Touch can't load data into store using proxy


    I am converting my application from sencha touch 1.x to 2.x. I can't load data into store using ajax proxy.
    Every time when I load store, it has only one record with null value. Data are correctly received from server that confirm with Firebug but not loaded into store.
    Here is my code for store and configuration
    Can you please look into this and reply me if I missing something to configure in store?

    Ext.define('Assignment', {
    extend : 'Ext.data.Model',
    config : {
    fields: [{
    name: "name",
    type: "string"
    }]
    }
    });

    store = Ext.create('Ext.data.Store', {
    model: "Assignment",
    proxy: {
    type: 'ajax',
    url: "RequestProcessor.aspx?command=GetAssignmentList",
    reader: {
    type: 'json',
    root: 'data'
    }
    },
    autoLoad: true
    });

  2. root needs to be rootProperty.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Answers
    3517
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    root needs to be rootProperty.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.