# Yahoo! UI Library

### TreeView Widget 2.8.2r1

Yahoo! UI Library > treeview > YAHOO.widget.RootNode
Search:
Filters
Show Private Show Protected Show Deprecated

## 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"

#### Properties inherited from YAHOO.widget.Node:

`_dynLoad, _focusedItem, _focusHighlightedItems, _type, children, childrenRendered, className, contentElId, contentStyle, data, dataLoader, depth, dynamicLoadComplete, editable, enableHighlight, expanded, hasIcon, highlightState, iconMode, index, isLeaf, isLoading, multiExpand, nextSibling, nowrap, parent, previousSibling, propagateHighlightDown, propagateHighlightUp, renderHidden, tree`

#### Properties inherited from YAHOO.util.EventProvider:

`__yui_events, __yui_subscribers`

### 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

#### Methods inherited from YAHOO.widget.Node:

`_canHaveFocus, _childrenHighlighted, _removeFocus, _setHighlightClassName, appendChild, appendTo, applyParent, collapse, collapseAll, completeRender, destroyEditorContents, displayEditedValue, editNode, expand, expandAll, fillEditorContainer, focus, getAncestor, getChildrenEl, getChildrenElId, getChildrenHtml, getContentEl, getContentHtml, getDepthStyle, getEditorValue, getEl, getElId, getHoverStyle, getHtml, getIconMode, getNodeCount, getNodeDefinition, getNodeHtml, getSiblings, getStyle, getToggleEl, getToggleElId, getToggleLink, hasChildren, hideChildren, highlight, init, insertAfter, insertBefore, isChildOf, isDynamic, isRoot, loadComplete, refresh, renderChildren, saveEditorValue, setDynamicLoad, setNodesProperty, showChildren, toggle, toggleHighlight, toString, unhighlight`

#### Methods inherited from YAHOO.util.EventProvider:

`createEvent, fireEvent, hasEvent, subscribe, unsubscribe, unsubscribeAll`

#### Events inherited from YAHOO.widget.Node:

`parentChange,`

Copyright © 2010 Yahoo! Inc. All rights reserved.