

Ext.namespace('com.domorewithsage.tabdialog.tree');

com.domorewithsage.tabdialog.tree.VISolutionsTree = Ext.extend(Ext.tree.TreePanel, {


    initComponent : function()
    {
        Ext.apply(this, {
            iconCls     : 'viSolutions',
            title       : 'VI Solutions',
            // set the following property to "false" if you do
            // not wish to show the rootNode
            rootVisible : true
        });

        this._buildNodes();

        com.domorewithsage.tabdialog.tree.VISolutionsTree.superclass.initComponent.call(this);
    },

    /**
     * Sets the root property for this TreePanel and appends child nodes
     */
    _buildNodes : function()
    {
        this.root = new Ext.tree.TreeNode({
            text     : 'Root Node',
            expanded : true
        });

        var child1 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Child 1'
        }));

        var child1_1 = child1.appendChild(
            new Ext.tree.TreeNode({
                text : 'Child 1 1',
                /**
                 * Set leaf to true if you do not want this node to be
                 * rendered as a node which can contain more childs.
                 * Make sure you do not append childs to this node if
                 * "leaf" is set to "true". Defaults to false.
                 */
                leaf : true
        }));
    }

});