PDA

View Full Version : Expand Tree Path



tvanzoelen
24 Aug 2011, 3:58 AM
How is this done in Extjs 4?



tree.expandPath(node.getPath());



expandPath exists but node.getPath() isn't there anymore

FoxMulder900
24 Aug 2011, 6:42 AM
Couldn't you just do:


node.expand();

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-method-expand

skirtle
26 Aug 2011, 11:35 PM
getPath() still exists:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-method-getPath

tvanzoelen
29 Aug 2011, 12:21 AM
Thanx, I didn't see that. That should work, else its a bug.

mufi
20 Sep 2011, 1:24 PM
Sure, the getPath method appears in the docs, but has anyone tried to use it? or searched for it in the source code related to Ext.data.NodeInterface?

skirtle
20 Sep 2011, 3:05 PM
It's in the current source code:

http://docs.sencha.com/ext-js/4-0/source/NodeInterface.html#Ext-data-NodeInterface-method-getPath

I believe it's in 4.0.5 and 4.0.6 but does seem to be missing in 4.0.2.

tvanzoelen
20 Sep 2011, 11:31 PM
It is missing in the docs, but the expandPath is there. But what happened with the selectPath and what was its function? I am migrating still and forgot where I used selectPath for. :)

skirtle
21 Sep 2011, 7:02 AM
But what happened with the selectPath and what was its function?

Suggest you take a look at the ExtJS 3 docs for TreePanel if you want to know what selectPath() did in that version:

http://dev.sencha.com/deploy/ext-3.4.0/docs/

It appears to do pretty much the same thing in 4.0.6:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tree.Panel-method-selectPath

From a quick check it appears to be there in 4.0.2 as well.

tvanzoelen
21 Sep 2011, 7:09 AM
You are right selectPath it is there. I didn't see it. The new trees were getting me nervous.