PDA

View Full Version : Unable to call data into vbox panel



mister_cairns
18 Jul 2011, 3:45 AM
I have a card set up, with a list and two card layouts called inside the card using a vbox layout. The list is calling in a twitter feed (which is working), and I have set one of the panel store's making a json request (and I know the json file is formatted correctly as it works elsewhere in the app) but my code doesn't seem to be rendering the data:


abc.homeTweets = new Ext.List({
scroll: false,
cls: 'timeline',
itemTpl: ['<div id="home_feed">', '<tpl for=".">', '<a href="http://www.twitter.com/{from_user}" target="_blank">{from_user}</a>', '<p>{text}</p>', '<span class="posted">{created_at}</span>', '</tpl>', '</div>'].join(''),
itemSelector: 'div.tweet',
emptyText: '<p style="padding: 10px">No tweets found matching that search</p>',

store: new Ext.data.Store({
autoLoad: true,
model: "Tweet",
proxy: {
type: 'scripttag',
url: 'http://search.twitter.com/search.json',
extraParams: {
q: 'sydney',
rpp: 3,
suppress_response_codes: true
},
reader: {
type: 'json',
root: 'results'
}
}
})
});

abc.homeChallenge = new Ext.Panel({
scroll: 'true',
tpl: '<tpl for="."><div class="person">{artistDescription}</div></tpl>',
store: new Ext.data.Store({
autoLoad: true,
model: 'Artists',
proxy: {
type: 'ajax',
url: 'http://localhost:8888/abc/stores/artists.json',
reader: {
type: 'json',
root: 'artists'
}
}
})
});

abc.homeIntro = new Ext.Panel({
html: 'Three'
});

abc.panel.Home = Ext.extend(Ext.Panel, {
id: 'home',
title: 'Home',
scroll: 'true',
iconCls: 'home',
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch',
},
items:[abc.homeIntro, abc.homeChallenge, abc.homeTweets]
});

Any tips?