Title: Tree and JSON Data Post by: LdyMox on June 04, 2012, 06:49:30 AM I can not seem to figure our how to get back the JSON data for the current places of the Tree UI. I am trying to use the JSON data and hope to pass the values via a form so I can save the data for later use.
Title: Re: Tree and JSON Data Post by: LdyMox on June 05, 2012, 08:01:07 AM I need to get the data back somehow, anyways so I can save the data. Loading is no problem, but can't figure how to access the current state of the tree so I can use it.
Title: Re: Tree and JSON Data Post by: stworthy on June 05, 2012, 06:22:41 PM Call 'getData' method to get a node data, get the root node data and store it in somewhere. To restore the tree, call 'loadData' method and pass the original root node data as its parameter. The code looks like this:
Code: var root = $('#tt').tree('getRoot'); // get root node The 'getData' method is implemented as below: Code: $.fn.tree.methods.getData = function(jq, target){ Title: Re: Tree and JSON Data Post by: LdyMox on June 06, 2012, 05:51:51 AM Ahh thank you! I knew there had to be something I was missing!
|