sap.ui.model.ListBinding.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.ListBinding 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.model.Binding.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.model.ListBinding.
Returns:
Filters the list according to the filter definitions
Parameters:
{object[]} | aFilters | Array of filter objects |
{sap.ui.model.FilterType} | sFilterType | Type of the filter which should be adjusted, if it is not given, the standard behaviour applies |
Returns:
Returns an array of binding contexts for the bound target list.
Note:The public usage of this method is deprecated, as calls from outside of controls will lead to unexpected side effects. For avoidance use sap.ui.model.ListBinding.prototype.getCurrentContexts instead.
Parameters:
{int} | iStartIndex? | the startIndex where to start the retrieval of contexts |
{int} | iLength?, Default: length of the list | determines how many contexts to retrieve beginning from the start index. |
Returns:
Returns an array of currently used binding contexts of the bound control
This method does not trigger any data requests from the backend or delta calculation, but just returns the context array as last requested by the control. This can be used by the application to get access to the data currently displayed by a list control.
- Since:
- 1.28
Returns:
getDistinctValues(sPath): Array
Returns list of distinct values for the given relative binding path
Parameters:
{string} | sPath | the relative binding path |
Returns:
{Array} | the array of distinct values. |
getGroup(oContext): object
Gets the group for the given context. Must only be called if isGrouped() returns that grouping is enabled for this binding. The grouping will be performed using the first sorter (in case multiple sorters are defined).
Parameters:
Returns:
{object} | the group object containing a key property and optional custom properties |
See:
sap.ui.model.Sorter.getGroup |
getLength(): int
Returns the number of entries in the list. This might be an estimated or preliminary length, in case the full length is not known yet, see method isLengthFinal().
- Since:
- 1.24
Returns:
{int} | returns the number of entries in the list |
isGrouped(): boolean
Indicates whether grouping is enabled for the binding. Grouping is enabled for a list binding, if at least one sorter exists on the binding and the first sorter is a grouping sorter.
Returns:
{boolean} | whether grouping is enabled |
isLengthFinal(): boolean
Returns whether the length which can be retrieved using getLength() is a known, final length, or an preliminary or estimated length which may change if further data is requested.
- Since:
- 1.24
Returns:
{boolean} | returns whether the length is final |
Sorts the list according to the sorter object
Parameters:
{sap.ui.model.Sorter|Array} | aSorters | the Sorter object or an array of sorters which defines the sort order |
Returns:
attachFilter(fnFunction, oListener?)
Attach event-handler fnFunction
to the 'filter' event of this sap.ui.model.ListBinding
.
Parameters:
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | object on which to call the given function. |
- Deprecated:
- use the change event. It now contains a parameter (reason : "filter") when a filter event is fired.
attachSort(fnFunction, oListener?)
Attach event-handler fnFunction
to the 'sort' event of this sap.ui.model.ListBinding
.
Parameters:
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | object on which to call the given function. |
- Deprecated:
- use the change event. It now contains a parameter (reason : "sort") when a sorter event is fired.
detachFilter(fnFunction, oListener?)
Detach event-handler fnFunction
from the 'filter' event of this sap.ui.model.ListBinding
.
Parameters:
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | object on which to call the given function. |
- Deprecated:
- use the change event.
detachSort(fnFunction, oListener?)
Detach event-handler fnFunction
from the 'sort' event of this sap.ui.model.ListBinding
.
Parameters:
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | object on which to call the given function. |
- Deprecated:
- use the change event.