View Full Version : Ext.tree.panel is not loading

25 Nov 2011, 1:23 AM
I have a requirement where need to generate a tree from the server response.
Server response comes as JSONArray(Spring JSONArray) which contains root and child nodes.
Earlier have used TreePanel from Extjs3.x, it worked fine,
we migrated from Extjs3.x to Extjs4.x , now nothing is happening even server url is not hitting.

Tried using TreeStore but is not supporting JSONArray format, any help would be appriciated.

Please check the below code snippet for pannel definition.

var availsvcTree = Ext.create('Ext.tree.Panel',
{ id:'avail-tree-panel', width:280, height:250,
bodyStyle: 'background-color:white;',
frame: true,
loader: {
url:'/main/avail_tree.json' (http://www.sencha.com/forum/'/main/avail_tree.json')
containerScroll: true,
root: {
text: 'Available Services',
id: 'source',
rootVisible: true

25 Nov 2011, 1:42 AM
i would definitely go for the treeStore, since it offers a lot of additional goodies.

it should not be a big deal to convert your array into an object:

{success: true, data: myJSONarray}

28 Nov 2011, 5:20 AM

Have tried using the TreeStore to load the data to the Ext.tree.Panel.

While page loading the page am getting ' record.isNode is noll or not an Object' from NodeInterface , after clicking the node getting internalId is null or not an object.

Spent lot of time to resolve but no luck any help would be appricitaed.If possible pls provide sample code

Below code is the part of the response coming from Server.

Actually this is JSONArrayFormat.