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.0r4

Yahoo! UI Library > treeview > YAHOO.widget.RootNode
Search:
 
Filters

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

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

Constructor

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

Properties

_type - private string

The node type
Default Value: "RootNode"

Methods

getNodeCount

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

getNodeDefinition

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 © 2009 Yahoo! Inc. All rights reserved.