1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default ST2PR2: xtype: list with explicit data is not rendering anything

    ST2PR2: xtype: list with explicit data is not rendering anything


    I'm trying to render a simple static list in ST2PR2, but I can't seem to nail this down. Is there any reason why this example should be rendering nothing? If I use {html:'hello'} instead of the list, I see 'hello' in the panel, so I'm not sure any of the setup is wrong.

    The elements specified by the fixed data store are not added to the DOM (or rendered, obviously). Why?

    Code:
    Ext.define('MoreList', {
        extend:'Ext.data.Model',
        fields:[
            {name:'text', type:'string'}
        ]
    });
    var listStore = Ext.create('Ext.data.Store', {model:'MoreList', data:[{text:'hello'}]});
    
    
    wendler.views.MoreInfoList = {
        id:'more-info-list-panel',
        xtype:'panel',
        items:[
            {
                xtype:'toolbar',
                title:'More',
                docked:'top'
            },
            {
                id:'more-info-list',
                xtype:'list',
                useComponents: true,
                itemConfig: {
                    cls: 'more-info-row'
                },
                itemTpl:'{text}',
                store:listStore
            }
        ]
    };

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Remove the useComponents and itemConfig configurations form your list. You do not need them.

    There is also a very simple example of the List component in the documentation: http://docs.sencha.com/touch/2-0/#!/....dataview.List
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Also be sure to upgrade to PR4, PR2 is rather old...
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  4. #4
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default


    I need Sencha IO support, and PR4 has localstorage issues that are supposedly fixed in the beta that broke in PR3. Removing the two config options did nothing; I'll check the example.

  5. #5
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default


    I found the issue.

    I hadn't specified "layout" on the xpanel! Shouldn't this be an error?

    Regardless, this is resolved!

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Location
    Sacramento, California
    Posts
    75
    Vote Rating
    8
    gypsie is on a distinguished road

      0  

    Default


    Quote Originally Posted by stefankendall View Post
    I hadn't specified "layout" on the xpanel!
    that solved it for me too. thanks

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    littlepine is on a distinguished road

      0  

    Default


    Quote Originally Posted by gypsie View Post
    that solved it for me too. thanks
    O Yeah!! It also solved my issue which I faced for 2 days!!
    Thank you very much !

  8. #8
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    Zarathon is on a distinguished road

      0  

    Default To me tooo

    To me tooo


    Resolved to me too!