1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    10
    Vote Rating
    0
    robsonala is on a distinguished road

      0  

    Default Unanswered: List with video

    Unanswered: List with video


    I'm trying create a list with xtype video inside, but i am not getting.

    i tried to use a defaultType on dataview but i need to use grouped and in there this don't work.

    My test:

    list
    Code:
    {
       xtype: 'list',
       disableSelection: true,
       flex: 1,
       useComponents: true, 
       defaultType: 'profilefavoritesitem',
       grouped: true
    }
    dataitem
    Code:
    Ext.define('Reed.view.Profile.Favorites.Item', {
        extend: 'Ext.dataview.component.DataItem',
        requires: ['Ext.Container'],
        xtype: 'profilefavoritesitem',
        
        config: {
            nameButton: true,
    
    
            dataMap: {
                getNameButton: {
                    setHtml: 'name'
                }
            }
        },
    
    
        applyNameButton: function(config) {
            return Ext.factory(config, Ext.Container, this.getNameButton());
        },
    
    
        updateNameButton: function(newNameButton, oldNameButton) {
            if (oldNameButton) {
                this.remove(oldNameButton);
            }
    
    
            if (newNameButton) {
                this.add(newNameButton);
            }
        }
    });
    In the list if i change the xtype list to dataview the item works, but the group disappears.

    Anybody can help me?

    Thanks,
    []s

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,408
    Answers
    3549
    Vote Rating
    851
    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


    Currently, components within lists is not supported and the docs will be updated to say useComponents is not a config option.
    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 - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Yeah - a easy way to get around this is to extend DataView and then simply set your baseCls to 'x-list'.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 2