PDA

View Full Version : List's are not loading!!!



Shariar Shaikot
29 Mar 2012, 9:15 AM
I don't know why, my stores are loading but list's not loading and nothing displaying.

Here is my store:

Ext.define('App.store.EventList', {
extend : 'Ext.data.Store',

config : {
autoLoad : true,
fields : [
{ name : 'Category', type : 'string' },
{ name : 'Id', type : 'int' },
{ name : 'Location', type : 'string' },
{ name : 'Title', type : 'string' }
],
proxy : {
type : 'jsonp',
url : 'http://portofino.quotient.net/data/api/events',
headers : {
'Accept' : 'application/json'
},
reader : {
type : 'json',
rootProperty : 'data'
}
}
}
});

Here is my view:


Ext.define('App.view.Events',{
extend: 'Ext.Panel',
xtype: 'events',

requires: [
'Ext.device.Notification',
'Ext.List',
'App.store.EventList'
],

config: {
fullscreen: true,
items: [
{
xtype: 'toolbar',
title: 'Events',
docked: 'top',
items: [
{
xtype: 'button',
ui: 'back',
text: 'Menu'
},
{xtype: 'spacer'},
{
xtype: 'button',
text: 'Call'
}
]
},
{
xtype: 'toolbar',
ui: 'light',
docked: 'top',
items: [
{
xtype: 'searchfield',
name: 'search',
placeHolder: 'Search...'
}
]
},
/*{
xtype: 'toolbar',
ui: 'neutral',
id: 'DateBar',
title: 'Today 13 June, 2012'
},*/
{
xtype: 'list',
store: 'EventList',
flex: 1,
ui: 'round',
disclosure: true,
itmTpl: '<h1>{Title}</h1> <p>{Category}</p> <span>{Location}</span>'
}
]
}
});

Please help me.

mitchellsimoens
29 Mar 2012, 9:53 AM
Your list doesn't know what size to have. You can either use the height config or give the Panel a layout to manage the list's height. Like if you give the panel layout : 'fit' it will work with no issue.

Shariar Shaikot
29 Mar 2012, 12:02 PM
Thanks , got it