Skip to main content

%ZEN.Component.dynaTree

deprecated class %ZEN.Component.dynaTree extends %ZEN.Component.component

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:

Property Inventory

Method Inventory

Parameters

parameter IMAGECONTRACTED;
Default url of image used for contracted tree node. This is only used when showLines is false.
parameter IMAGEEXPANDED;
Default url of image used for expanded tree node. This is only used when showLines is false.
parameter IMAGEFOLDERCLOSED = folderclosed.gif;
Default url of image used for closed folder nodes.
parameter IMAGEFOLDEROPEN = folderopen.gif;
Default url of image used for open folder nodes.
parameter IMAGENODE = node.gif;
Default url of image used for a leaf node in the tree.

Properties

property OnGetNodeInfo as %ZEN.Datatype.delegator (FORMALSPEC = "*tSC:%Status,&tParameters:%String,pLevel:%Integer,&pHandle:%String,pNodeInfo:%ZEN.Auxiliary.NodeInfo", RETURNTYPE = "%Boolean");
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.
Property methods: OnGetNodeInfoDisplayToLogical(), OnGetNodeInfoGet(), OnGetNodeInfoIsValid(), OnGetNodeInfoLogicalToDisplay(), OnGetNodeInfoLogicalToOdbc(), OnGetNodeInfoNormalize(), OnGetNodeInfoSet()
property OnGetTreeInfo as %ZEN.Datatype.delegator (FORMALSPEC = "pRoot:%String,*pTree:%List,&tParameters:%String", RETURNTYPE = "%Status");
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 the OnGetNodeInfo callback. It lets you define the contents of the entire tree using a multi-dimensional array.
If this is defined then the OnGetNodeInfo 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
}
Property methods: OnGetTreeInfoDisplayToLogical(), OnGetTreeInfoGet(), OnGetTreeInfoIsValid(), OnGetTreeInfoLogicalToDisplay(), OnGetTreeInfoLogicalToOdbc(), OnGetTreeInfoNormalize(), OnGetTreeInfoSet()
property childIndent as %ZEN.Datatype.length [ InitialExpression = 20 ];
Specifies amount child nodes should be indented. This value is only applied when showLines is false.
Property methods: childIndentDisplayToLogical(), childIndentGet(), childIndentIsValid(), childIndentLogicalToDisplay(), childIndentLogicalToOdbc(), childIndentNormalize(), childIndentSet()
property dataGlobal as %ZEN.Datatype.glvn;
If defined, and there is no user-defined OnGetNodeInfo() 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.
Property methods: dataGlobalDisplayToLogical(), dataGlobalGet(), dataGlobalIsValid(), dataGlobalLogicalToDisplay(), dataGlobalLogicalToOdbc(), dataGlobalNormalize(), dataGlobalSet()
property imageContracted as %ZEN.Datatype.uri;
url of image used for contracted tree node (when showLines is false).
Property methods: imageContractedDisplayToLogical(), imageContractedGet(), imageContractedIsValid(), imageContractedLogicalToDisplay(), imageContractedLogicalToOdbc(), imageContractedNormalize(), imageContractedSet()
property imageExpanded as %ZEN.Datatype.uri;
url of image used for expanded tree nodes (when showLines is false).
If you set this, make sure you also set imageContracted.
Property methods: imageExpandedDisplayToLogical(), imageExpandedGet(), imageExpandedIsValid(), imageExpandedLogicalToDisplay(), imageExpandedLogicalToOdbc(), imageExpandedNormalize(), imageExpandedSet()
property imageFolderClosed as %ZEN.Datatype.uri;
url of image used for a closed folder node in the tree.
If not specified, a default image is supplied.
Property methods: imageFolderClosedDisplayToLogical(), imageFolderClosedGet(), imageFolderClosedIsValid(), imageFolderClosedLogicalToDisplay(), imageFolderClosedLogicalToOdbc(), imageFolderClosedNormalize(), imageFolderClosedSet()
property imageFolderOpen as %ZEN.Datatype.uri;
url of image used for an open folder node in the tree.
If not specified, a default image is supplied.
Property methods: imageFolderOpenDisplayToLogical(), imageFolderOpenGet(), imageFolderOpenIsValid(), imageFolderOpenLogicalToDisplay(), imageFolderOpenLogicalToOdbc(), imageFolderOpenNormalize(), imageFolderOpenSet()
property imageNode as %ZEN.Datatype.uri;
url of image used for a leaf node in the tree.
If not specified, a default image is supplied.
Property methods: imageNodeDisplayToLogical(), imageNodeGet(), imageNodeIsValid(), imageNodeLogicalToDisplay(), imageNodeLogicalToOdbc(), imageNodeNormalize(), imageNodeSet()
property nodeCount as %ZEN.Datatype.integer (XMLPROJECTION = "none", ZENSETTING = 0) [ InitialExpression = 0 ];
This is used to keep track of how many nodes are in this tree.
Property methods: nodeCountDisplayToLogical(), nodeCountGet(), nodeCountIsValid(), nodeCountLogicalToDisplay(), nodeCountLogicalToOdbc(), nodeCountNormalize(), nodeCountSet()
property onchange as %ZEN.Datatype.eventHandler;
onchange event handler: If defined, this event is fired when the user changes the value of this component.
Property methods: onchangeDisplayToLogical(), onchangeGet(), onchangeIsValid(), onchangeLogicalToDisplay(), onchangeLogicalToOdbc(), onchangeNormalize(), onchangeSet()
property onclick as %ZEN.Datatype.eventHandler;
onclick event handler: If defined, this event is fired when the user clicks on an item
Property methods: onclickDisplayToLogical(), onclickGet(), onclickIsValid(), onclickLogicalToDisplay(), onclickLogicalToOdbc(), onclickNormalize(), onclickSet()
property ondblclick as %ZEN.Datatype.eventHandler;
ondblclick event handler: If defined, this event is fired when the user double-clicks on an item
Property methods: ondblclickDisplayToLogical(), ondblclickGet(), ondblclickIsValid(), ondblclickLogicalToDisplay(), ondblclickLogicalToOdbc(), ondblclickNormalize(), ondblclickSet()
property parameters as array of %ZEN.Auxiliary.parameter (XMLKEYNAME = "paramName", XMLNAME = "parameter", XMLPROJECTION = "ELEMENT");
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.
Property methods: parametersBuildValueArray(), parametersCollectionToDisplay(), parametersCollectionToOdbc(), parametersDisplayToCollection(), parametersGet(), parametersGetObject(), parametersGetObjectId(), parametersGetSwizzled(), parametersIsValid(), parametersOdbcToCollection(), parametersSet(), parametersSetObject(), parametersSetObjectId()
property selectedIndex as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (0-based) of current selected tree node.
Property methods: selectedIndexDisplayToLogical(), selectedIndexGet(), selectedIndexIsValid(), selectedIndexLogicalToDisplay(), selectedIndexLogicalToOdbc(), selectedIndexNormalize(), selectedIndexSet()
property showFolders as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true and showLines is false, display open and closed folder icons as well as icons for each node in the tree. The default is true.
If showLines is true, this property is ignored.
Property methods: showFoldersDisplayToLogical(), showFoldersGet(), showFoldersIsValid(), showFoldersLogicalToDisplay(), showFoldersLogicalToOdbc(), showFoldersLogicalToXSD(), showFoldersNormalize(), showFoldersSet(), showFoldersXSDToLogical()
property showLines as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, show dashed lines (as a series of images) between the nodes of the tree.
Property methods: showLinesDisplayToLogical(), showLinesGet(), showLinesIsValid(), showLinesLogicalToDisplay(), showLinesLogicalToOdbc(), showLinesLogicalToXSD(), showLinesNormalize(), showLinesSet(), showLinesXSDToLogical()
property text as %ZEN.Datatype.string (XMLPROJECTION = "none");
Text (display) value of current item within the view. Do not access this directly; use getProperty('text') instead.
Property methods: textDisplayToLogical(), textGet(), textIsValid(), textLogicalToDisplay(), textLogicalToOdbc(), textNormalize(), textSet()
property value as %ZEN.Datatype.string (XMLPROJECTION = "none");
Logical value of current item within the view. Do not access this directly; use getProperty('value') instead.
Property methods: valueDisplayToLogical(), valueGet(), valueIsValid(), valueLogicalToDisplay(), valueLogicalToOdbc(), valueNormalize(), valueSet()

Methods

method %DrawHTML()
Draw HTML for this component.
classmethod %GetImageDirectory() as %String
Return the directory from which built-in images are supplied.
clientmethod dragStartHandler(dragData) [ Language = javascript ]
Built-in drag handler for tree component. Let the user drag the selected node.
clientmethod expandAll(flag) [ Language = javascript ]
Expand (if flag is true) or contract (if flag is false) all nodes within the true; Does not invoke any callback methods.
clientmethod getNodeParent(nodeNo) [ Language = javascript ]
Return the index number (0-based) of the parent of the specified node. nodeNo is the index number of the node (0-based).
clientmethod getNodeText(nodeNo) [ Language = javascript ]
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.
clientmethod getNodeValue(nodeNo) [ Language = javascript ]
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.
clientmethod getSelectedIndex() [ Language = javascript ]
Return the index number (0-based) of the current node. Return -1 if no node is selected.
clientmethod getValue() [ Language = javascript ]
Get the logical value of the current selected node.
clientmethod isNodeExpanded(nodeNo) [ Language = javascript ]
This method returns the expanded state of a given nodeNo. true = expanded.
clientmethod itemClicked(idx, level) [ Language = javascript ]
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.
clientmethod itemDblClicked(idx, level) [ Language = javascript ]
User double-clicked on an item.
clientmethod reloadNode(nodeNo) [ Language = javascript ]
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 the OnGetTreeInfo callback is used to supply the contents of the tree.
clientmethod selectItem(idx) [ Language = javascript ]
Select the given node within the tree. idx is index of node (0 based).
clientmethod setNodeStyle(nodeNo, style) [ Language = javascript ]
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).
clientmethod setNodeText(nodeNo, text) [ Language = javascript ]
Set the display value of a given node. nodeNo is the index number of the node (0-based).
clientmethod setNodeValue(nodeNo, value) [ Language = javascript ]
Set the logical value of a given node. nodeNo is the index number of the node (0-based).
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod toggleExpanded(nodeNo) [ Language = javascript ]
Toggle the current expanded state of a given node within the tree. nodeNo is the index number of the node (0-based).

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab