My Treepanel has the id 'treePanel' and works just fine.
Example path:
/subfolder3/abc
Expanding all with expandAll()
works with the tree panel but expandPath()
does not work.
Now, after some event I want to expand a path in my tree. However I can not make it.
So far I have tried:
var oTreePanel = Ext.getCmp('treePanel');
oTreePanel.expandPath('/subfolder3/abc'); // or '/subfolder3' or '/root/subfolder3'
There is no error message but also no change in the tree.
What to do?
EDIT
oTreePanel.selModel.getSelection()[0].getPath()
is /root/
.
What I tried:
path:
/root
=>success
istrue
andnode
saysnode.data.id=""
andnode.data.path=""
path:
/root/
=>success
istrue
andnode
saysnode.data.id=""
andnode.data.path="/report_with_variables"
(first node in the tree) andnode.data.parentId= "root"
path:
/root/subfolder3
to the path:success
isfalse
andnode
saysnode.data.id=""
andnode.data.path=""
andnode.getPath()
is/root
My Json response for the tree looks like this:
{"status":{"status":0,"msg":"Ok","protocolversion":"extjs.json"},"value":{"name":"","path":"\/","type":"folder","leaf":false,"children":[{"name":"report_with_variables","path":"\/report_with_variables","type":"report","leaf":true,"title":"Report ohne Variablen","description":null},{"name":"subfolder1","path":"\/subfolder1","type":"folder","leaf":false},{"name":"subfolder2","path":"\/subfolder2","type":"folder","leaf":false},{"name":"subfolder3","path":"\/subfolder3","type":"folder","leaf":false},{"name":"testreports","path":"\/testreports","type":"folder","leaf":false}]}}