Issue 379: toDict() shouldn't export root node
Status:  Fixed
Owner: ----
Closed:  Sep 2013
Reported by waldir.pimenta, Nov 18, 2012
exporting a tree with toDict() includes a root node (title:null, key:_1) that makes the resulting object not compatible to be loaded back with dynatree.

The default behavior should be the one that is currently obtained by doing toDict().children (or at the very least this caveat should be mentioned in the documentation, at http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h8.4.8)

Alternatively (and perhaps a better choice, though not as straightforward to implement) loading the tree from json data should recognize this root node and not make it a child node of the tree, but instead apply its properties to the tree (e.g. title, id...)
Nov 20, 2012
Project Member #1 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: Milestone-Release1.2.3
Feb 10, 2013
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: -Milestone-Release1.2.3 Milestone-Release1.2.4
Feb 12, 2013
Project Member #3 moo...@wwwendt.de
1.2.4 was a hotfix
Labels: -Milestone-Release1.2.4 Milestone-Release1.2.5
Sep 7, 2013
#4 Ghoff...@gmail.com
Thank you Waldir took me forever to figure out how to solve this until I read your post
Sep 7, 2013
Project Member #5 moo...@wwwendt.de
This issue was closed by revision r674.
Status: Fixed
Sep 8, 2013
#6 waldir.pimenta
yay \o/
Oct 31, 2013
#7 tar...@frisvoldprivatgymnas.no
I think this is great, but you should note in the Changelog that this causes 1.2.5 not to be BC.

I.e. if I call toDict() I will get the new behaviour instead of todays behaviour.
Nov 1, 2013
#8 Lor...@gmail.com
Strong agree with #7. I looked at the ChangeLog, but did not know there was a breaking behavior change. Had to restore some data when I ran this the first time and inadvertently deleted root node relationships in the database.
Nov 2, 2013
Project Member #9 moo...@wwwendt.de
Sorry to hear that the change caused you problems.
I edited the project page and change log to make this hopefully more clear.
Nov 4, 2013
#10 Lor...@gmail.com
Thanks. It was relatively minor, just didn't think upgrading a JS library would take down QA for half an hour. Guess that's why the system is there.