1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    ericmatthys is on a distinguished road

      0  

    Default Unanswered: List isn't rendering data

    Unanswered: List isn't rendering data


    If I try to include a list in a container as part of the items array, the list does not render its data properly.

    The following list works correctly:

    Code:
    Ext.define('App.view.SpacesView', {    extend: 'Ext.List',
        xtype: 'spacesview',
    
    
        config: {
            title: 'Spaces',
            fullscreen: true,
            store: 'SpacesStore',
            itemTpl: '{name}',
            onItemDisclosure: true
        }
    });
    However, when I try to use a list like so, it doesn't work.

    Code:
    Ext.define('App.view.MilestonesView', {    extend: 'Ext.Container',
        xtype: 'milestonesview',
    
    
        config: {
            title: 'Milestones',
            fullscreen: true,
    
    
            layout: {
                type: 'vbox',
                align: 'center',
                pack: 'center'
            },
    
    
            items: [
                {
                    xtype: 'milestoneslist'
                },
                {
                    xtype: 'button',
                    width: 'auto',
                    text: 'See All Tickets'
                }
            ]
        }
    });
    
    Ext.define('App.view.MilestonesList', {
        extend: 'Ext.List',
        xtype: 'milestoneslist',
    
    
        config: {
            fullscreen: true,
            itemTpl: '{name}',
            store: 'MilestonesStore',
            onItemDisclosure: true
        }
    });
    I have tried everything I can think of including manually calling refresh on the list. It works if the list is the main component, but if I try to include it in the container, it does not work.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,994
    Answers
    3487
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Are you using Sencha Touch 1 or 2?

    I'm assuming 2. First in MilestonesList you shouldn't have have fullscreen config set. You should have flex or a height/width set on it so that MilestonesView can give it a size.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,994
    Answers
    3487
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Moved to ST2 Q&A forum.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    ericmatthys is on a distinguished road

      0  

    Default


    Sorry yeah this is Sencha Touch 2. I took out fullscreen from the list and tried some different width / height / flex values (although I just want it to take up the full width and however much height it needs). It is still not rendering any data. The list is being created correctly and I can see the right divs in the DOM, but it has no items. I double checked the store and the store that is supposed to be supplying it with data does in fact have items. Calling getStore on the list returns the correct store as well.

Thread Participants: 1