Copyright © 2021 by K4.org
  (v.0.48.124)

UITree provides two ways of populating the tree, Instant and Delayed.

Instant

*UITree** has a rootNodes array rule. This should evaluate to an array of UITreeNode objects. This will populate the UITree without additional roundtrips to the server.

Delayed

*UITree** has rootRefchain and rootExpression rules. when the UITree is created, the client will evaluate rootExpression in the rootRefchain model context. The expression must return an array of POJOs in the same form as used in the Instant Data method. Custom UI will populate root level of the tree (one or more nodes) with the data retrieved.

UITreeNode Structure


{
"title": "Name of this Node",
"isExpandable": true|false,
"nodes": [],
"nodesRefChain": "refChain to the model having nodesExpression",
"nodesExpression": "expression returning array of UITreeNodes"
}

These objects can be collected from UITreeNodeMixin models.

There are two alternate ways to specify a tree:

  1. By supplying nodes directly. If nodes is supplied, nodesRefChain, nodesExpression, and isExpandable will be ignored.

  2. By supplying nodesRefChain and nodesExpression. In this case, if isExpandable is true, the system will request the next level from the server, by using the nodesRefChain and nodesExpression values.

You can combine 'Instant' and 'Delayed' approaches. The above controls work at any level.

Index

Rules

controlType

controlType: String

no doc

Flags : Cached (Note this is uncached)

Expression : "Tree"

instantUpdate

instantUpdate: Boolean

Only used wheninside a UIDialog. If true, bypasses the normal "update on OK" behavior of UIDialog, and will update the UI as soon as a change is made.

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : false

propagateSelectionDown

propagateSelectionDown: Boolean

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : false

propagateSelectionUp

propagateSelectionUp: Boolean

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : false

rootExpression

rootExpression: String

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : ""

rootNodes

rootNodes: Array

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : []

rootNodesVersion

rootNodesVersion: String

If tree content is supplied on demand (lazy load, via the rootExpression), this rule can be used to determine the loaded data freshness. Initialize it with any value (e.g. with datetime when the root level nodes are obtained first time, or just any unique string), then change it everytime when the whole tree is no longer valid. Custom UI will clean whole tree and re-load the top level again on each change of the rootNodesVersion.

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : ""

rootRefchain

rootRefchain: String

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : this.refChain

selectedNode

selectedNode: Any

This is the default binding target for tree selection. If selectionMode is 'single', the selectedNode will be a string containing a selected node refChain. If selectionMode is 'multiple' or 'checkbox', the selectedNode will be an array of selected refChains.

Flags : Cached, Parameter (Note this is uncached)

Expression : ""

selectedNodeBindParent

selectedNodeBindParent: Any

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : this

selectedNodeBindTarget

selectedNodeBindTarget: String

no doc

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : "selectedNode"

selectionMode

selectionMode: String

valid values are: 'single', 'multiple' and 'checkbox'.

Flags : Cached, Parameter, Spec (Note this is uncached)

Expression : "single"