PDA

View Full Version : Find all nodes with some attribute in a TreePanel



ssayen
30 Jun 2010, 11:26 PM
Hi,

I need a simple feature on my TreePanel but couldn't manage to find/make it. I just want to toggle hiding some of the rendered nodes, and for that I need to find each node with a "hidden" attribute set to true.
I tried to use the TreePanel "findBy" method, but it doesn't seem to look at the nodes.

Any idea ?
Thanks

ssayen
1 Jul 2010, 10:20 PM
I finally used Ext.DomQuery to retrieve elements I needed.
Anyway I don't like this solution so if anyone has better, I'm still interested.

Thanks.

Condor
1 Jul 2010, 10:46 PM
You could have used treePanel.getRootNode().cascade().

ssayen
1 Jul 2010, 11:05 PM
You mean cascade i guess :D

Exactly the method I looked for. Yet I did look at each one, but missed this one.

Thanks Condor !