1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    28
    Vote Rating
    1
    Designbase is on a distinguished road

      1  

    Default How do I do set up this code in Architect?

    How do I do set up this code in Architect?


    I tried to do this in Architect but was not able to get it to work.
    How do I do this? Thnx Ron

    Code:
    Ext.define('ListItem', {
        extend: 'Ext.data.Model',
        config: {
            fields: ['text']
        }
    });
    
    
    var treeStore = Ext.create('Ext.data.TreeStore', {
        model: 'ListItem',
        defaultRootProperty: 'items',
        root: {
            items: [
                {
                    text: 'Drinks',
                    items: [
                        {
                            text: 'Water',
                            items: [
                                { text: 'Still', leaf: true },
                                { text: 'Sparkling', leaf: true }
                            ]
                        },
                        { text: 'Soda', leaf: true }
                    ]
                },
                {
                    text: 'Snacks',
                    items: [
                        { text: 'Nuts', leaf: true },
                        { text: 'Pretzels', leaf: true },
                        { text: 'Wasabi Peas', leaf: true  }
                    ]
                }
            ]
        }
    });
    
    
    var detailContainer = Ext.create('Ext.Container', {
        layout: 'card',
        flex: 1
    });
    
    
    var nestedList = Ext.create('Ext.NestedList', {
        store: treeStore,
        detailContainer: detailContainer,
        detailCard: true,
        listeners: {
            leafitemtap: function(nestedList, list, index, target, record) {
                var detailCard = nestedList.getDetailCard();
                detailCard.setHtml('You selected: ' + record.get('text'));
            }
        },
        flex: 1
    });
    
    
    Ext.Viewport.add({
        layout: 'hbox',
        items: [
            nestedList,
            detailContainer
        ]
    });
    Last edited by aconran; 25 Apr 2012 at 11:36 AM. Reason: add code tags

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar