PDA

View Full Version : TreePanel



benshort
2 Dec 2009, 2:09 PM
Hi,

I am trying to create a tree panel using the following code with ext js 3.0.3:



var node2 = new Ext.tree.TreeNode({
text: 'Node 2',
leaf: true,
id: '2'
});

var node1 = new Ext.tree.TreeNode({
text: 'Node 1',
children: [node2],
id: '1'
});

var rootNode = new Ext.tree.AsyncTreeNode({
text: 'Root',
children: [node1],
id: 'root'
});

var tree2 = new Ext.tree.TreePanel({
renderTo:'tree-div2',
title: 'Routes',
height: 300,
width: 300,
useArrows:true,
autoScroll:true,
animate:true,
enableDD:false,
containerScroll: true,
rootVisible: false,
frame: false,
root: rootNode
});


The TreePanel renders ok but then I click on Node 1 to expand it the spinning icon shows and that's all that happens. Fire bug shows no errors.

Any ideas?

Regards

Ben Short