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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Answers
    3976
    Vote Rating
    1368
      0  

    Default

    root needs to be rootProperty.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    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
  •