The TreeItemType object describes a tree node type that, unlike the TreeNodeType, cannot contain additional tree nodes. They represent the leaves of the Tree.
● onAction (String path)
This event is triggered when the user selects a node of this type. parameter is the path to the relevant context element.
● onDrop (String data, String mimeType, int offset, String path, String tags
This event is triggered when the user drops an object onto this TreeNodeType. The parameters are:
○ data: The data specified for the drag source.
○ mimeType: the mime type specified for the drag source.
○ offset: the position relative to the index, the user has dropped the object onto.
■ -1: just above the item specified by the index
■ 0: right onto the item specified by the index
■ +1: just below the item specified by the index.
○ path: The tree node is described by a path to the node element representing it. Declare an action and event handler parameter of type IWDNodeElement (or one of your own node element classes) along with a suitable parameter mapping; then the path will be automatically transformed into a node element instance. Note: when the tree is empty, no drop will be possible.
○ tags: the tags defined for the drag source