Hi All,
I am facing a problem with dojo
tree.
The requirement is to display a dojo
tree as default expanded and also user can click on "Expand All"
which will alow the tree to expand.
For both these activities I am using
a java script function:
function
expandAllNode()
{
var
treeObj = dijit.byId('mytree');
var
children = treeObj.rootNode.getChildren();
expandChildNode(children, treeObj);
}
function
expandChildNode(children, treeObj)
{
for
(var
i = 0; i < children.length; i++)
{
var
node = children[i];
if
(node.isExpandable && !node.isExpanded)
{
treeObj._expandNode(node);
}
var
childNodes = node.getChildren();
if
(childNodes.length > 0)
{
expandChildNode(childNodes, treeObj);
}
}
}
Now for auto expand I am calling it
by
dojo.addOnLoad(function(){
timer = setTimeout("expandAllNode()",1000);
highlightNode();
});
Problem: The problem is If the
tree is too large it will not being expanded by default within 1000
millisecond.
Also if the tree is too small
first it showing in collapse mode the its expanding after a bit of second.
Also for a big tree Expand All is taking
too much time (some times may be more 1 min have to wait for Expand All)
Can you please help me by providing
a robus sollution which will allow me to auto expand as well as Expand
All.
regards
Pronab
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
FAQ:
http://dojotoolkit.org/support/faqBook:
http://dojotoolkit.org/docs/bookForums:
http://dojotoolkit.org/forumDojo-interest@...
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest