Class Reference
IRIS for UNIX 2024.1.2
|
|
Private
Storage
|
This component draws an HTML tree control based on executing
a user-provided callback method.
There are several ways that you can provide data for the tree control:
|
|
Subclasses | |
---|---|
%CSP.UI.Component.SMPDynaTree | %DeepSee.Component.dsdynaTree |
|
Default url of image used for contracted tree node. This is only used whenshowLines is false.
Default url of image used for expanded tree node. This is only used whenshowLines is false.
Default url of image used for closed folder nodes.
Default url of image used for open folder nodes.
Default url of image used for a leaf node in the tree.
|
Name of Server-side callback method to call to get information for each node of this tree.
This must be the name of a server-only method in the page class that contains this component.
Name of Server-side callback method to call to get information for the entire contents of the tree.
This is a lower-level callback than theOnGetNodeInfo callback. It lets you define the contents of the entire tree using a multi-dimensional array.
If this is defined then theOnGetNodeInfo callback is not used.
This must be the name of a server-only method in the page class that contains this component.
The callback method should be similar to this:ClassMethod GetTreeInfo(pRoot As %String, Output pTree, ByRef pParms) As %Status { #; top-most nodes are children of 0 Set pTree(0,"ch",1) = "" Set pTree(0,"ch",2) = "" Set pTree(0,"ch",3) = "" #; each node supplies: $LB(caption, value, hasChildren, link, expanded, icon, tooltip, style) Set pTree(1) = $LB("Animal",1,1,"",1) Set pTree(2) = $LB("Mineral",2,1,"",1) Set pTree(3) = $LB("Vegetable",3,1,"",1) #; child nodes are placed under "ch" Set pTree(1,"ch",4) = "" Set pTree(4) = $LB("Cow",4,0,"",1) Quit $$$OK }
Specifies amount child nodes should be indented. This value is only applied whenshowLines is false.
If defined, and there is no user-definedOnGetNodeInfo callback method, then this is the name of a global that is used to provide the contents of this tree.
The global takes the form:
^glvn("A","B") = URL
The global subscripts define the node names; The URL value is a link that is used when the user clicks on the node.
url of image used for contracted tree node (whenshowLines is false).
url of image used for expanded tree nodes (whenshowLines is false).
If you set this, make sure you also setimageContracted .
url of image used for a closed folder node in the tree.
If not specified, a default image is supplied.
url of image used for an open folder node in the tree.
If not specified, a default image is supplied.
url of image used for a leaf node in the tree.
If not specified, a default image is supplied.
This is used to keep track of how many nodes are in this tree.
onchange event handler: If defined, this event is fired when the user changes the value of this component.
onclick event handler: If defined, this event is fired when the user clicks on an item
ondblclick event handler: If defined, this event is fired when the user double-clicks on an item
User-defined set of parameters. These values are passed on to the user callback function that provides the contents of this view. Typically this is used to hold search parameters.
Index (0-based) of current selected tree node.
If true andshowLines is false, display open and closed folder icons as well as icons for each node in the tree. The default is true.
IfshowLines is true, this property is ignored.
If true, show dashed lines (as a series of images) between the nodes of the tree.
Text (display) value of current item within the view. Do not access this directly; use getProperty('text') instead.
Logical value of current item within the view. Do not access this directly; use getProperty('value') instead.
|
Draw HTML for this component.
Return the directory from which built-in images are supplied.
Built-in drag handler for tree component. Let the user drag the selected node.
Expand (if flag is true) or contract (if flag is false) all nodes within the true; Does not invoke any callback methods.
Return the index number (0-based) of the parent of the specified node. nodeNo is the index number of the node (0-based).
Get the display value of a given node. nodeNo is the index number of the node (0-based). If nodeNo is not provided use the current selected noded.
Get the logical value of a given node. nodeNo is the index number of the node (0-based). If nodeNo is not provided use the current selected noded.
Return the index number (0-based) of the current node. Return -1 if no node is selected.
Get the logical value of the current selected node.
This method returns the expanded state of a given nodeNo. true = expanded.
User clicked on an item. idx is index of node (0 based). level is indentation level of node (0 based); this is passed on to the callback.
User double-clicked on an item.
Reload the child nodes of the given node. nodeNo is the index number of the node (0-based).
This method does nothing if it called for a leaf node (a node without children).
This method only works when theOnGetTreeInfo callback is used to supply the contents of the tree.
Select the given node within the tree. idx is index of node (0 based).
Set the css style for of a given node. style should contain css style declarations (e.g., 'color: red;')
nodeNo is the index number of the node (0-based).
Set the display value of a given node. nodeNo is the index number of the node (0-based).
Set the logical value of a given node. nodeNo is the index number of the node (0-based).
Set the value of a named property.
Toggle the current expanded state of a given node within the tree. nodeNo is the index number of the node (0-based).