YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

TreeView Widget  2.8.2r1

Yahoo! UI Library > treeview > YAHOO.widget.RootNode

Class YAHOO.widget.RootNode - extends YAHOO.widget.Node

A custom YAHOO.widget.Node that handles the unique nature of the virtual, presentationless root node.


YAHOO.widget.RootNode ( oTree )
oTree <YAHOO.widget.TreeView> The tree instance this node belongs to


_type - private string

The node type
Default Value: "RootNode"



int getNodeCount ( )
Count of nodes in tree. It overrides Nodes.getNodeCount because the root node should not be counted.
Returns: int
number of nodes in the tree


Object | false getNodeDefinition ( )
Returns an object which could be used to build a tree out of this node and its children. It can be passed to the tree constructor to reproduce this node as a tree. Since the RootNode is automatically created by treeView, its own definition is excluded from the returned node definition which only contains its children.
Returns: Object | false
definition of the tree or false if any child node is defined as dynamic

Events inherited from YAHOO.widget.Node:

Copyright © 2010 Yahoo! Inc. All rights reserved.