Class sap.ui.model.TreeBindingAdapterModule: sap/ui/model/TreeBindingAdapter
Experimental API:This module is only for experimental and internal use!
Constructor Summary
new sap.ui.model.TreeBindingAdapter()Adapter for TreeBindings to add the ListBinding functionality and use the tree structure in list based controls.
Method Summary
_calculateRequestLength(iMaxGroupSize, oSection)Calculate the request length based on the given information
attachSelectionChanged(oData?, fnFunction, oListener?)Attach event-handler
fnFunction
to the 'selectionChanged' event of this sap.ui.model.SelectionModel
.detachSelectionChanged(fnFunction, oListener)Detach event-handler
fnFunction
from the 'selectionChanged' event of this sap.ui.model.SelectionModel
.getNodes(iStartIndex, iLength, iThreshold)Retrieves the requested part from the tree and returns node objects.
Constructor Detail
Method Detail
_calculateRequestLength(iMaxGroupSize, oSection)
Calculate the request length based on the given information
Parameters:
{int} | iMaxGroupSize | the maximum group size |
{object} | oSection | the information of the current section |
attachSelectionChanged(oData?, fnFunction, oListener?): sap.ui.model.SelectionModel
Attach event-handler
Event is fired if the selection of tree nodes is changed in any way.
fnFunction
to the 'selectionChanged' event of this sap.ui.model.SelectionModel
.Event is fired if the selection of tree nodes is changed in any way.
Parameters:
{object} | oData? | The object, that should be passed along with the event-object when firing the event. |
{function} | fnFunction | The function to call, when the event occurs. This function will be called on the oListener-instance (if present) or in a 'static way'. |
{object} | oListener? | Object on which to call the given function. If empty, this Model is used. |
Returns:
{sap.ui.model.SelectionModel} | this to allow method chaining |
detachSelectionChanged(fnFunction, oListener): sap.ui.model.SelectionModel
Detach event-handler
fnFunction
from the 'selectionChanged' event of this sap.ui.model.SelectionModel
.The passed function and listener object must match the ones previously used for event registration.
Parameters:
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener | Object on which the given function had to be called. |
Returns:
{sap.ui.model.SelectionModel} | this to allow method chaining |
fireSelectionChanged(mArguments): sap.ui.model.SelectionModel
Fire 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)
Parameters:
{object} | mArguments | the arguments to pass along with the event. |
{int} | mArguments.leadIndex | Lead selection index |
{int[]} | mArguments.rowIndices? | Other selected indices (if available) |
Returns:
{sap.ui.model.SelectionModel} | this to allow method chaining |