Results 1 to 4 of 4

Thread: List isn't rendering data

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

  3. #3
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    Moved to ST2 Q&A forum.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
      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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •