View Full Version : Tree Export Json

24 Nov 2010, 10:19 AM
Using a TreePanel with drag&drop enabled to allow users to reorder structure. Creating the tree based on existing json is done but is there a method to "extract" json from the modified tree to post back/save?

24 Nov 2010, 10:41 AM
After looking through the API and source files, it looks like you'll have to build up the JSON yourself, by going after the Nodes of the TreePanel.

It looks like TreeNode (extended from Ext.data.Node) has public property attributes which will let you get at the detailed data of each node, including any children.

From there, I'd write a recursive routine which starts at the root tree node and builds up the JSON to be posted.

24 Nov 2010, 10:42 AM
I just came across this which is magically working.