PDA

View Full Version : Ext4 How to get JSon from a Tree Panel



mihaip007
6 Jan 2012, 9:50 PM
Hey guys. I wonder if anyone could lend me a hand please.

i have been at this for a week, and searched low and high, read through docs, but nothing. I have a Tree whicch gets loaded from a Json file. All happy there.

Then i created a way to add, remove, move nodes and set a whole lot of attributes to the nodes. This is meant to represent my appliation's menu structure.

Now I want to save the tree structure with all the attributes associated for each node. In version 3 there was a function "nodetojson" (can't remember the name) which was not documented, but it worked like a charm.

This function does not exist now.

What is the best way to send the entire tree structure with it's attributes to the server? My thought was to get the entire structure as a Json. I cannot find anything like that.

Any help would be appreciated.

Thanks guys...
Mihai

mitchellsimoens
7 Jan 2012, 6:24 AM
I can't find any nodetojson function or anything like it. I see toString but I wouldn't think that is what you mean.

You may have to cascade down the hierarchy to build your JSON.

mihaip007
9 Jan 2012, 2:45 PM
Hi there..! Cascade did the trick - thank you kindly...!