Results 1 to 2 of 2

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

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Ahmedabad, Gujarat, india
    Posts
    12
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    root needs to be rootProperty.
    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

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
  •