sap.ui.commons.TreeNode.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.TreeNode with name
sClassName and enriches it with the information contained in
oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Element.extend.
Parameters:
| {string} | sClassName | Name of the class being created |
| {object} | oClassInfo? | Object literal with information about the class |
| {function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
| {function} | Created class / constructor function |
Returns a metadata object for class sap.ui.commons.TreeNode.
Returns:
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
| {string|sap.ui.core.Control} | vAriaDescribedBy | the ariaDescribedBy to add; if empty, nothing is inserted |
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
| {string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
Returns:
Adds some node to the aggregation nodes.
Parameters:
Returns:
Attaches event handler
fnFunction to the
selected event of this
sap.ui.commons.TreeNode.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.commons.TreeNode itself.
Node is selected
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.TreeNode itself |
Returns:
Attaches event handler
fnFunction to the
toggleOpenState event of this
sap.ui.commons.TreeNode.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.commons.TreeNode itself.
Node state has changed.
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.TreeNode itself |
Returns:
collapse(bCollapseChildren, bDisableCollapseFinishedHandler)
Collapses the node.
Parameters:
| {boolean} | bCollapseChildren | Propagates collapse to node's children |
| {boolean} | bDisableCollapseFinishedHandler | Disables the collapse finished handler |
Destroys all the nodes in the aggregation nodes.
Returns:
Detaches event handler
fnFunction from the
selected event of this
sap.ui.commons.TreeNode.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction from the
toggleOpenState event of this
sap.ui.commons.TreeNode.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
expand(bExpandChildren, bDisableExpandFinishedHandler)
Expands the node.
Parameters:
| {boolean} | bExpandChildren | Propagates expand to node's children |
| {boolean} | bDisableExpandFinishedHandler | Disables the expand finished handler |
Fires event selected to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
toggleOpenState to attached listeners.
Expects the following event parameters:
opened of type booleanNode has been opened if true
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
getExpanded(): boolean
Gets current value of property
expanded.
Node is expanded
Default value is true.
Returns:
| {boolean} | Value of property expanded |
getHasExpander(): boolean
Gets current value of property
hasExpander.
Should the node has an expander.
Default value is false.
Returns:
| {boolean} | Value of property hasExpander |
Gets current value of property
icon.
Icon to display in front of the node
Returns:
getIsSelected(): boolean
Gets current value of property
isSelected.
Node is selected
Default value is false.
Returns:
| {boolean} | Value of property isSelected |
Gets content of aggregation
nodes.
Subnodes for the current node
Returns:
getSelectable(): boolean
Gets current value of property
selectable.
The node is selectable. If true, clicking on the node text triggers "selected" event
Default value is true.
Returns:
| {boolean} | Value of property selectable |
getText(): string
Gets current value of property
text.
Node text
Returns:
| {string} | Value of property text |
indexOfNode(oNode): int
Checks for the provided sap.ui.commons.TreeNode in the aggregation nodes. and returns its index if found or -1 otherwise.
Parameters:
Returns:
| {int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a node into the aggregation nodes.
Parameters:
| {sap.ui.commons.TreeNode} | oNode | the node to insert; if empty, nothing is inserted |
| {int} | iIndex | the 0-based index the node should be inserted at; for a negative value of iIndex, the node is inserted at position 0; for a value greater than the current size of the aggregation, the node is inserted at the last position |
Returns:
Removes all the controls in the association named ariaDescribedBy.
Returns:
Removes all the controls in the association named ariaLabelledBy.
Returns:
Removes all the controls from the aggregation
nodes.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
| {int|string|sap.ui.core.Control} | vAriaDescribedBy | The ariaDescribedByto be removed or its index or ID |
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
| {int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
Returns:
Removes a node from the aggregation nodes.
Parameters:
Returns:
select(bSuppressEvent, bDeselectOtherNodes)
Select the node, and if any, deselects the previously selected node
Parameters:
| {boolean} | bSuppressEvent | |
| {boolean} | bDeselectOtherNodes | |
Sets a new value for property
expanded.
Node is expanded
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
Parameters:
| {boolean} | bExpanded | New value for property expanded |
Returns:
Sets a new value for property
hasExpander.
Should the node has an expander.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is false.
Parameters:
| {boolean} | bHasExpander | New value for property hasExpander |
Returns:
Sets a new value for property
icon.
Icon to display in front of the node
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
Returns:
Redefinition of Setter for property
isSelected for validation purpose
Default value is empty/undefined
Parameters:
| {boolean} | bIsSelected | new value for property isSelected |
Returns:
Redefinition of Setter for property
selectable for validation purpose.
Default value is true
Parameters:
| {boolean} | bSelectable | new value for property selectable |
Returns:
Sets a new value for property
text.
Node text
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
| {string} | sText | New value for property text |
Returns: