Migrating from ExtJS 3.0 to 4.0

Earlier in ext 3.0, we had a Tree panel built from an XML response. To do this, we had a custom class extending 'Ext.tree.TreeLoader' This TreeLoader was useful for building a tree structure (parent / child nodes).

During migration to 4.0, it was discovered that the TreeLoader class is missing. Is there a replacement for this class or any other way to create a tree structure?

I want to create a tree structure for the following xml: Actually, I want to build a tree structure from this XML:

<?xml version='1.0' ?>
<Root>
<Folder>
<CreateDate>Apr 29, 2011</CreateDate>
<CreatedBy>1000</CreatedBy>
<Files/>
<FolderName>Testing</FolderName>
<FolderNamePath/>
<FolderPath/>
<Folders>
<Folder>
<CreateDate>Apr 6, 2011</CreateDate>
<CreatedBy>1000</CreatedBy>
<Files/>
<FolderName>JayM</FolderName>
<Folders>
<Folder>
<CreateDate>Apr 6, 2011</CreateDate>
<CreatedBy>1000</CreatedBy>
<Files/>
<FolderName>JaM</FolderName>
<Id>2000</Id>
<ModDate>Dec 30, 2011</ModDate>
<ParentFolderId>1948</ParentFolderId>
</Folder>
</Folders>
<Id>1948</Id>
<ModBy>1000</ModBy>
<ModDate>Dec 30, 2011</ModDate>
<ParentFolderId>1</ParentFolderId>
</Folder>

<Folder>
<CreateDate>Dec 2, 2011</CreateDate>
<CreatedBy>1000</CreatedBy>
<Files/>
<FolderName>demo folder</FolderName>
<Folders/>
<Id>2427</Id>
<ModBy/>
<ModDate/>
<ParentFolderId>1</ParentFolderId>
</Folder>

</Folders>
<Id>1</Id>
<ModBy/>
<ModDate/>
<ParentFolderId/>
</Folder>
</Root>

Any help is appreciated.

+5
source share
2 answers

TreeStore, ( XmlReader ) TreeLoader Ext 4. TreeStore (.. ), NodeInterface, , . API API- store/record, TreeLoader 3.x, .

, XML , .

+3

ExtJS 4 - - (/ ).

:

var treepanel = Ext.create('Ext.tree.Panel',{ 
id : 'tree', 
width : 300, 
height : 300, 
store : testStore, 
rootVisible : false 
});
+1

All Articles