私の Treepanel には 'treePanel' という ID があり、問題なく動作します。
パスの例:
/subfolder3/abc
expandAll()
ツリー パネルですべてを展開すると機能しますが、expandPath()
機能しません。
さて、あるイベントの後、ツリーのパスを拡張したいと思います。しかし、私はそれを作ることができません。
これまでのところ、私は試しました:
var oTreePanel = Ext.getCmp('treePanel');
oTreePanel.expandPath('/subfolder3/abc'); // or '/subfolder3' or '/root/subfolder3'
エラーメッセージはありませんが、ツリーにも変化はありません。
何をすべきか?
編集
oTreePanel.selModel.getSelection()[0].getPath()
です/root/
。
私が試したこと:
path:
/root
=>success
はtrue
とnode
言うnode.data.id=""
とnode.data.path=""
path:
/root/
=>success
istrue
とnode
言うnode.data.id=""
andnode.data.path="/report_with_variables"
(ツリーの最初のノード) andnode.data.parentId= "root"
パス:
/root/subfolder3
へ パス:success
はfalse
とnode
言うnode.data.id=""
とnode.data.path=""
はnode.getPath()
/root
ツリーに対する私の Json レスポンスは次のようになります。
{"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}]}}