1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    28
    Vote Rating
    0
    Shariar Shaikot is on a distinguished road

      0  

    Default List's are not loading!!!

    List's are not loading!!!


    I don't know why, my stores are loading but list's not loading and nothing displaying.

    Here is my store:
    Code:
    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:

    Code:
    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.
    Last edited by mitchellsimoens; 29 Mar 2012 at 9:52 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,682
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    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.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    28
    Vote Rating
    0
    Shariar Shaikot is on a distinguished road

      0  

    Default


    Thanks , got it

Tags for this Thread