class sap.ui.model.TreeBindingAdapter

Visiblity: protected
UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/ui/model/TreeBindingAdapter
Application Component: CA-UI5-COR

Constructor

Adapter for TreeBindings to add the ListBinding functionality and use the tree structure in list based controls.

new sap.ui.model.TreeBindingAdapter()

Methods Overview

Method Description
_calculateRequestLength

Calculate the request length based on the given information.

Since 1.52 This method is marked as 'protected' which was meant to be overwritten by its subclasses. It may be renamed or deleted and should only be called from this class or its subclasses.
attachSelectionChanged

Attaches event handler fnFunction to the selectionChanged event of this sap.ui.model.TreeBindingAdapter.

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.model.TreeBindingAdapter itself.

Event is fired if the selection of tree nodes is changed in any way.

detachSelectionChanged

Detaches event handler fnFunction from the selectionChanged event of this sap.ui.model.TreeBindingAdapter.

The passed function and listener object must match the ones used for event registration.

fireSelectionChanged

Fires event selectionChanged to attached listeners.

Expects following event parameters:

  • 'leadIndex' of type int Lead selection index.
  • 'rowIndices' of type int[] Other selected indices (if available)

getContexts

Gets an array of contexts for the requested part of the tree.

getLength

Returns the number of entries in the tree.

getNodes

Gets an array of nodes for the requested part of the tree.

_calculateRequestLength

Calculate the request length based on the given information.

Since 1.52 This method is marked as 'protected' which was meant to be overwritten by its subclasses. It may be renamed or deleted and should only be called from this class or its subclasses.
Param Type DefaultValue Description
iMaxGroupSize number

The maximum group size

oSection object

The information of the current section

attachSelectionChanged

Attaches event handler fnFunction to the selectionChanged event of this sap.ui.model.TreeBindingAdapter.

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.model.TreeBindingAdapter itself.

Event is fired if the selection of tree nodes is changed in any way.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function

The function to be called, when the event occurs

oListener object

Context object to call the event handler with. Defaults to this TreeBindingAdapter itself

detachSelectionChanged

Detaches event handler fnFunction from the selectionChanged event of this sap.ui.model.TreeBindingAdapter.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

fireSelectionChanged

Fires event selectionChanged to attached listeners.

Expects following event parameters:

Param Type DefaultValue Description
oParameters object

Parameters to pass along with the event.

leadIndex int

Lead selection index

rowIndices int[]

Other selected indices (if available)

getContexts

Gets an array of contexts for the requested part of the tree.

Param Type DefaultValue Description
iStartIndex number 0

The index of the first requested context

iLength number

The maximum number of returned contexts; if not given the model's size limit is used; see sap.ui.model.Model#setSizeLimit

iThreshold number 0

The maximum number of contexts to read to read additionally as buffer

getLength

Returns the number of entries in the tree.

getNodes

Gets an array of nodes for the requested part of the tree.

Param Type DefaultValue Description
iStartIndex number

The index of the first requested node

iLength number

The maximum number of returned nodes; if not given the model's size limit is used; see sap.ui.model.Model#setSizeLimit

iThreshold number 0

The maximum number of nodes to read additionally as buffer