Issue 442: tree.getNodeByKey() returns node from wrong tree (when there are multiple trees with same keys)
Status:  WontFix
Owner: ----
Closed:  Sep 2013
Reported by augursys...@gmail.com, Jul 14, 2013
What steps will reproduce the problem?
1. I have two separate trees on a page (e.g. tree1, tree2), each with a visible root node (a node below dynatree's hidden root) whose key is "/"  (FYI, my keys are pathnames, although that doesn't matter.)
2. $("#tree2").dynatree("getTree").getNodeByKey("/") returns the root node from tree1.  


It seems to me (without looking at your code) that your keys are indexed globally, rather than scoped per tree instance? If so, that's makes the keys unreliable for multiple trees unless we guarantee unique keys across all trees.


Dynatree version 1.2.4, revision 644, 2013-02-12 21:39:36
jQuery 1.9.1
Mac OS X, Safari.  (but doesn't matter?)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Jul 20, 2013
Project Member #1 moo...@wwwendt.de
The element id is generated from a prefix string + the node key. 
getNodeByKey() tries to find the Node by these ids first, before traversing the tree.
You can change the prefix with the 'keyIdPrefix' option (or similar) to make it unique
Status: Waiting
Labels: -Type-Defect Type-Enhancement Milestone-Release1.2.5
Sep 7, 2013
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Status: WontFix
Apr 16, 2014
Project Member #3 moo...@wwwendt.de
 Issue 483  has been merged into this issue.