YUITree

YUI Tree.

Extends HTMLObject

Extends SeSSimulatedObject

Behavior Pattern: YUITreeBehavior

Property Summary

Property Description Getter Setter
ChildrenCount Children count of the current node in the tree. GetChildrenCount
Expanded Expanded state of the current node. GetExpanded
NodeIndex Zero based index of the current node. GetNodeIndex
NodeText Text of the current node. GetNodeText
Selected Selected state of the current node. GetSelected
SelectedNodeText Text of the selected node. GetSelectedNodeText

Action Summary

Action Description
DoClickNode Clicks specific node in the tree.
DoCollapse Collapses specific node in the tree.
DoExpand Expands specific node in the tree.
DoFindChild Finds child node by its path from the current node and remembers it as the current node.
DoFindNode Searches for specific node in the tree and remembers it as the current node.
DoGetPath Returns path to the current node.

Property Detail

ChildrenCount

Children count of the current node in the tree.

Type: number

Accessors: GetChildrenCount

Expanded

Expanded state of the current node. Use DoFindNode to set current node. 0 - if the node is collapsed, 1 - if the node is expanded, 2 - if the node is a leaf.

Type: number

Accessors: GetExpanded

NodeIndex

Zero based index of the current node. Use DoFindNode to set current node.

Type: number

Accessors: GetNodeIndex

NodeText

Text of the current node. Use DoFindNode to set current node.

Type: string

Accessors: GetNodeText

Selected

Selected state of the current node. Use DoFindNode to set current node. 'true' if the node is selected, 'false' otherwise.

Type: boolean

Accessors: GetSelected

SelectedNodeText

Text of the selected node.

Type: string

Accessors: GetSelectedNodeText

Action Detail

DoClickNode(path, separator, pathType)

Clicks specific node in the tree.

Parameters:

Name Type Description
path string Path of the node
separator string Separator character.
Optional, Default: ;.
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.

Returns:

boolean: 'true' if success, 'false' otherwise.

DoCollapse(path, separator, pathType)

Collapses specific node in the tree.

Parameters:

Name Type Description
path string Path of the node
separator string Separator character.
Optional, Default: ;.
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.

Returns:

boolean: 'true' if success, 'false' otherwise.

DoExpand(path, separator, pathType)

Expands specific node in the tree.

Parameters:

Name Type Description
path string Path of the node
separator string Separator character.
Optional, Default: ;.
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.

Returns:

boolean: 'true' if success, 'false' otherwise.

DoFindChild(path, separator, pathType, expand)

Finds child node by its path from the current node and remembers it as the current node. If current node is not set then Root node is used.

Parameters:

Name Type Description
path string Path of the node
separator string Separator character.
Optional, Default: ;.
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.
expand boolean is set to true, then found node is expanded

Returns:

HTMLObject: HTMLObject of the found node

DoFindNode(path, separator, pathType, expand)

Searches for specific node in the tree and remembers it as the current node.

Parameters:

Name Type Description
path string Path of the node
separator string Separator character.
Optional, Default: ;.
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.
expand boolean is set to true, then found node is expanded

Returns:

HTMLObject: HTMLObject of the found node

DoGetPath(pathType, separator)

Returns path to the current node.

Parameters:

Name Type Description
pathType string Path type. Can be one of 'name', 'id' or 'index'.
Optional, Default: name.
separator string Separator character.
Optional, Default: ;.

Returns:

string: Path to the current node