PDA

View Full Version : building Tree panel from XML data



shreyasrale
30 Dec 2011, 4:56 AM
Hi all,
Previously in ext 3.0 we had Tree Panel built from XML response.
For that we had custom class extending 'Ext.tree.TreeLoader'
This TreeLoader was useful to build tree structure (parent/child nodes).

While migrating to 4.0 found that TreeLoader class is missing.

Any help is appreciated

mitchellsimoens
30 Dec 2011, 9:19 AM
http://docs.sencha.com/ext-js/4-0/#!/example/tree/xml-tree.html

Unfortunately looks like we are getting a 500 error. Luckily, this XML tree example comes with the zip download when you downloaded Ext JS 4.

shreyasrale
1 Jan 2012, 10:04 PM
Hi Mitchell ,

Thanks for reply. I had seen that example, but it has only single node i.e. <nodes></nodes> in response.
I built another tree similarly with few nodes i.e. using this XML
<nodes>
<node> </node>
<node> </node>
<node>
<name>parent </name>
<node>name>child</node>
</node>
</nodes>

I found that Tree has 3 nodes that is ok. but when any node is expanded, again 3 nodes are attached as child nodes.
I want custom control over node creation.
Previously in EXtJs 3.0 I had used Ext.ux.TreeLoader, and TreeNode