The TreeNodeType object describes a tree node type that, unlike the TreeItemType, can contain additional tree nodes. They represent the nodes of the Tree.
● expanded
Specifies whether or not a tree node can be collapsed or expanded. The binding of this property is not mandatory, however, we recommend the binding of the property to a context attribute. In this case, this context attribute must be contained in a context node to which the datasource property is bound. You can now specify the initial expansion status of the tree node.
● hasChildren
Specifies whether or not a tree node has children. If you define an onLoadChildren event handler, the corresponding tree element is displayed as a tree node by default – that is, the tree element has an expansion symbol that can be used to expand or collapse the tree. If you know beforehand or during the LoadOnDemand that a tree element does not contain children, you can set the hasChildren property to false. The default value of this property is true. The tree element is then displayed as a leave without expansion symbol.
The hasChildren property is only evaluated if no data for children of the corresponding tree element is available. Tree elements are always displayed as tree nodes if data for their children is available.
Name |
Interface |
Type |
Initial Value |
Bindable |
dataSource |
IWDAbstractTreeNodeType |
Object |
|
bindable_mandatory |
design |
IWDAbstractTreeNodeType |
WDTreeNodeDesign |
standard |
bindable |
expanded |
IWDTreeNodeType |
boolean |
false |
bindable |
hasChildren |
IWDTreeNodeType |
boolean |
true |
bindable |
iconAlt |
IWDAbstractTreeNodeType |
String (TranslatableText) |
|
bindable |
iconSource |
IWDAbstractTreeNodeType |
String |
|
bindable |
ignoreAction |
IWDAbstractTreeNodeType |
boolean |
false |
bindable |
text |
IWDAbstractTreeNodeType |
String (TranslatableText) |
|
bindable |
tooltip |
IWDAbstractTreeNodeType |
String (TranslatableText) |
|
bindable |
● onAction (String path)
This event is triggered, if the user selects a node.
● onLoadChildren (String path)
This event is triggered, if the data for a compressed tree node that initially has no children is read from the back end only if required. The corresponding event handler is called when a tree node without data for its children is expanded. The Web Dynpro application can use the event handler to read data for the children of the expanded tree node and add this data to the tree.
The event
handler of the event onLoadChildren is only triggered during the expansion if no data
for the children of the expanded node exists. If the application adds data
during the expansion, the event is not triggered when the tree node is opened
again.
Since the introduction of the generic event parameter nodeElement the parameter path is not needed anymore and is only available for compatibility reasons.