PDA

View Full Version : Tree: Refreshing a node's children or the entire tree?



eargang
14 Jan 2007, 6:02 PM
I'm sorry I keep adding more treePanel threads but this one doesn't fit in with the other one. Is there a way to refresh all the children of a node (maybe have it re-call the TreeLoader URL?) or, if neccesary reload the entire tree?

(if anyone's documented the TreePanel for the time being, before the powers that be get to it, i'd love to see some kinda in-the-meantime-document)

tryanDLS
14 Jan 2007, 6:54 PM
TreePanel as well as everything in SVN is pre-alpha code, so it's unlikely that anyone has documented code that may not have been stabilized.

eargang
14 Jan 2007, 7:14 PM
ok, that makes sense. for the time being, i've tracked what i needed down with the forum search. by the way, when i search and there's multiple pages of results, clicking on 'page 2' gives me a 'no results' screen.

http://www.yui-ext.com/forum/viewtopic.php?t=2009&highlight=tree+refresh

the only downside to this trick is that it automatically expands all branches but i can probably just use the config of the node that i'm reloading to not have it expand.

eargang
14 Jan 2007, 8:14 PM
more proof that I should take a minute before I post - node.expand(false) only expands the node I'm reloading, as is evidenced by every **$% example of the treePanel. I should be shot.

eargang
14 Jan 2007, 8:28 PM
one more for the road.

is there an existing way to search the treePanel instance for a specific node based on it's id?

tryanDLS
14 Jan 2007, 8:50 PM
Tree.getNodeById(yourid)