Check property dataLoader:
http://developer.yahoo.com/yui/docs/YAHOO.widget.Node.html#property_dataLoaderif it is null, go ahead, if it is set, then check dynamicLoadComplete:
http://developer.yahoo.com/yui/docs/YAHOO.widget.Node.html#property_dynamicLoadCompleteIf false, don't try to read the element because it is not there yet.
Satyam
malutanpetronel wrote:
> results is containig a list of node id's
> node is tree.getRoot() on the first call
>
> function expandRecursive(node,results){
> var node;
> var results = results.toString();
> alert(node.children.length + " " + results);
> for (var ki=0, kj=node.children.length; ki<kj; ki++) {
> var childnode = node.children[ki];
> var idtoSearch = childnode.data.id;
> if (parseInt(results.indexOf(idtoSearch)) >= 0){
> //childnode.expand();
> expandRecursive(childnode,results);
> }
> }
> }
>
> all works if i expand manually all the nodes in my dyanmic tree based
> on the YUI example
>
> if the nodes are not expanded before, than the procedure fail
>
> how can I fix it or how to do it differently please ? what event and
> where to insert it ?
>
> With kind regards
> Petronel
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG -
http://www.avg.com
> Version: 8.0.135 / Virus Database: 270.4.4/1532 - Release Date: 03/07/2008 8:32
>
>
>
>