Accessing nested objects in JSON feed - Sencha Touch

后端 未结 1 543
栀梦
栀梦 2021-01-03 12:02

I\'ll begin with the usual disclaimer: new to Sencha Touch/working with JSON, floundering in the dark. Any help or prodding in the right direction is appreciated more than y

1条回答
  •  情书的邮戳
    2021-01-03 12:13

    The solution! Turns out Sencha didn't like the $ in my template variable.

    Ext.regModel('Count', {
        fields: [{name:'count', mapping:'content.$t'}]
    
    });
    
    this.list = new Ext.List({
                itemTpl: new Ext.XTemplate('
    {count}
    '), loadingText: false, store: new Ext.data.Store({ model: 'Count', proxy: { type: 'scripttag', url : 'http://spreadsheets.google.com/feeds/cells/0AuYDRk91MX8-dHhkV29ZVkRGNjlvZjV4QVBIVmJubVE/odb/public/basic?range=A1&alt=json', reader: { type: 'json', root: 'feed.entry' } } }) });

    0 讨论(0)
提交回复
热议问题