View Full Version : New to EXT, help plz

16 Apr 2007, 3:40 PM
hi all,
looking to add a dynamic tree to the west panel but I'm not sure how/why this doesn't work. I started with the Feedreader example and am trying to integrate the "source" tree from the dependancy ex.

Also any information on progressive population of the tree from an XML provider would be helpful. Thanks, I can't wait to become enlightened :) Ext looks very promising!

// this is for the file tree
var stree = new xt.TreePanel('exp', {
loader: new xt.TreeLoader({dataUrl:'?action=xmlTree'}),
containerScroll: true

new xt.TreeSorter(stree, {folderSort:true});

var sroot = new xt.AsyncTreeNode({
text: 'Root',
sroot.expand(false, false);
// west = layout.getRegion('west');
// west.add(stree); /// I tried :/

16 Apr 2007, 4:25 PM

my post right above yours is about the same topic!!

Animal has provided a very nice code in the examples&extra section of this forum on how to construct a tree from xml. Look at this thread: http://extjs.com/forum/showthread.php?t=3987

As to how add a tree to the west panel of a borderlayout, I am myself still having difficulties with it. If I advance any further, I'll let you know


16 Apr 2007, 9:39 PM
If you're just getting started with the tree and you have the means on the server to control whether the response is in XML or JSON, I'd suggest you pick JSON over XML everytime.

16 Apr 2007, 9:57 PM
I appreicate the input but can you offer any insight on how to add the control to the west pane as I'm atempting? Still not sure why this isn't working.

16 Apr 2007, 11:12 PM
A TreePanel is not a ContentPanel.

You must create a ContentPanel from the TreePanel's container, and add that ContentPanel to the Region.

16 Apr 2007, 11:34 PM
Thank you that worked !!! :)