class
SAPO.Component.TreeView
Version:
1.1
Since:
Defined in
Component/TreeView/1.1/lib.js
October 2011
Constructor Summary
returns a new instance of SAPO.Component.TreeView
Function Summary
clears the selected node (if any)
destroy()
removes any dependecies
returns the selected note's text
returns the Array of the selected path (from root to selected node)
returns array of toggled ids
render()
renders any additional DOM/CSS content
selectNode
(id|SpanElement
content)
changes node selection (if not found or undefined selects nothing)
setToggledNodes
(String[]
ids)
sets toggled nodes
changes the state of all nodes in the tree
toggleSubTree
(String|String[]
idOrIds)
toggles sub tree(s)
Constructor Details
constructor TreeView
TreeView(String|DomElement
element, Object
options)
returns a new instance of SAPO.Component.TreeView
Parameters:
element
- element which will be enriched (or its id) Function Details
function clearSelection
clearSelection()
clears the selected node (if any)
function destroy
destroy()
removes any dependecies
function getSelectedNode
String
getSelectedNode()
returns the selected note's text
Returns:
the selected text or undefined, if nothing is selected
function getSelectedPath
String[]
getSelectedPath()
returns the Array of the selected path (from root to selected node)
Returns:
the selected text or undefined, if nothing is selected
function getToggledNodes
String[]
getToggledNodes()
returns array of toggled ids
function render
render()
renders any additional DOM/CSS content
function selectNode
selectNode(id|SpanElement
content)
changes node selection (if not found or undefined selects nothing)
Parameters:
content
- node content to look for (either String or SPAN) function setToggledNodes
setToggledNodes(String[]
ids)
sets toggled nodes
Parameters:
ids
function toggleNodesOpening
toggleNodesOpening()
changes the state of all nodes in the tree
function toggleSubTree
toggleSubTree(String|String[]
idOrIds)
toggles sub tree(s)
Parameters:
idOrIds