PDA

View Full Version : TreePanel problem, can anyone help me pls?



rsebastia@ya.com
24 Feb 2012, 2:19 PM
I'm trying to build a tree panel with a XML Store

And my code is:
Ext.require([

'Ext.tree.*',

'Ext.data.*'

]);

Ext.onReady(function() {

var store = Ext.create('Ext.data.TreeStore', {

proxy: {

type: 'ajax',

url: 'http://localhost/webpanel/datos/lec_var.xml',

reader: {

type: 'xml',

record: 'node',

root: 'nodes'

}

},

root: {

text: 'Variables',

expanded: true

}

});

// create the Tree

var tree = Ext.create('Ext.tree.Panel', {

store: store,

hideHeaders: true,

rootVisible: true,

useArrows: true,

height: 350,

width: 400,

title: 'Directory Listing',

renderTo: 'tree-example',

collapsible: true

});

});

And the result is:
Why are children repeated, in root and in parents?


32125

Thank you

mankz
24 Feb 2012, 9:17 PM
Old bug http://www.sencha.com/forum/showthread.php?136404-INFOREQ-4.0.2-RC3-Returning-nested-XML-data-for-a-Tree-doesn-t-work...


Please bump that thread to make devs aware of it.