X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..b37ceabb82336ee82757cd32efe353cfab8ec267:/docs/output/Ext.tree.TreePanel.html diff --git a/docs/output/Ext.tree.TreePanel.html b/docs/output/Ext.tree.TreePanel.html index d60b393e..ef4fb92f 100644 --- a/docs/output/Ext.tree.TreePanel.html +++ b/docs/output/Ext.tree.TreePanel.html @@ -1,114 +1,114 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Component
    BoxComponent
      Container
        Panel
          TreePanel

Class Ext.tree.TreePanel

Package:Ext.tree
Defined In:TreePanel.js
Class:TreePanel
Subclasses:ColumnTree
Extends:Panel
xtype:treepanel

The TreePanel provides tree-structured UI representation of tree-structured data.

-

TreeNodes added to the TreePanel may each contain metadata -used by your application in their attributes property.

-

A TreePanel must have a root node before it is rendered. This may either be -specified using the root config option, or using the setRootNode method. -

An example of tree rendered to an existing div:

var tree = new Ext.tree.TreePanel({
-    renderTo: 'tree-div',
-    useArrows: true,
-    autoScroll: true,
-    animate: true,
-    enableDD: true,
-    containerScroll: true,
-    border: false,
-    // auto create TreeLoader

-    dataUrl: 'get-nodes.php',
-
-    root: {
-        nodeType: 'async',
-        text: 'Ext JS',
-        draggable: false,
-        id: 'source'
-    }
-});
-
-tree.getRootNode().expand();
-

The example above would work with a data packet similar to this:

[{
-    "text": "adapter",
-    "id": "source\/adapter",
-    "cls": "folder"
-}, {
-    "text": "dd",
-    "id": "source\/dd",
-    "cls": "folder"
-}, {
-    "text": "debug.js",
-    "id": "source\/debug.js",
-    "leaf": true,
-    "cls": "file"
-}]
-

An example of tree within a Viewport:

new Ext.Viewport({
-    layout: 'border',
-    items: [{
-        region: 'west',
-        collapsible: true,
-        title: 'Navigation',
-        xtype: 'treepanel',
-        width: 200,
-        autoScroll: true,
-        split: true,
-        loader: new Ext.tree.TreeLoader(),
-        root: new Ext.tree.AsyncTreeNode({
-            expanded: true,
-            children: [{
-                text: 'Menu Option 1',
-                leaf: true
-            }, {
-                text: 'Menu Option 2',
-                leaf: true
-            }, {
-                text: 'Menu Option 3',
-                leaf: true
-            }]
-        }),
-        rootVisible: false,
-        listeners: {
-            click: function(n) {
-                Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
-            }
-        }
-    }, {
-        region: 'center',
-        xtype: 'tabpanel',
-        // remaining code not shown ...

-    }]
-});

Config Options

Config OptionsDefined By