I have this blocking issue and I cannot move on further, the data is getting loading in the store (checked through chrome console). But unable to load / bind the data in the list.
Currently in the code below, I am using the panel and then trying to load the data in the items. But I have also tried to use Ext.List instead of the panel but to no avail.
In my code below, I am not setting the root of the json or the record as there is no root.
Hope anyone can help me out.
Here is the code for the Model and the store
Code:
Ext.regModel('Itemsor', {
fields: [
{name: 'text', type: 'string'},
{name: 'created_at', type: 'string'},
{name: 'retweeted', type: 'string'}
]
});
App.StoreItems = new Ext.data.Store({
model: 'Itemsor',
proxy: {
type: 'scripttag',
url : 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=digg',
reader: {
type: 'json'
}
},
});
App.StoreItems.load();
Here is the code for the view
Code:
App.views.TimelineIndex = Ext.extend(Ext.Panel, {
layout : 'fit',
scroll : 'vertical',
items: [{
xtype : 'list',
store: 'App.StoreItems',
itemTpl: '{text}, <span class="date">{created_at}</date>',
singleSelect : true,
itemSelector : 'span.id',
onItemDisclosure : function(record, btn, index) {
}
}],
});
Ext.reg('TimelineIndex', App.views.TimelineIndex);