PDA

View Full Version : [CLOSED][3.??] TreePanel:Using "/" as id for node conflicts with select/expandPath



sander@presis.nl
29 Jun 2009, 6:04 AM
Hi :)

I have a simple tree I dynamically load by using Ajax calls. I prefer to have the root be called either nothing (empty string "" or null), or "/". In the former case, ExtJS will assign a name to it anyway (xnode-3 or something similar). In the latter case, the name is correctly assigns but the expandPath() and selectPath() functions do not work properly. Obviously this is because I use "/" as path separator as well and the split() functions can't distinguish.

This isn't any major problem, but just wanted to point out this might be confusing for people. Is it an idea to allow root nodes be called ""? So that if I have nodes "A" and "B", their paths become "/A" and "/B"?

evant
30 Jun 2009, 1:36 AM
The tree uses the id under the hood for a number of things, which is why nodes require an id. As you've suggested, using "/" as the id for a node isn't a good idea. At this point I wouldn't consider this a bug, just a behaviour to be aware of. Going to mark this as closed.