class sap.ui.model.odata.ODataListBinding

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/model/odata/ODataListBinding
Application Component: CA-UI5-COR

List binding implementation for OData format.


Constructor

new sap.ui.model.odata.ODataListBinding(oModel, sPath, oContext, aSorters?, aFilters?, mParameters?)
Param Type Default Value Description
oModel sap.ui.model.odata.ODataModel

Model that this list binding belongs to

sPath string

Path into the model data, relative to the given oContext

oContext sap.ui.model.Context

Context that the sPath is based on

aSorters? array

Initial sort order (can be either a sorter or an array of sorters)

aFilters? array

Predefined filter/s (can be either a filter or an array of filters)

mParameters? object

A map which contains additional parameters for the binding

expand? string

Value for the OData $expand query parameter which should be included in the request

select? string

Value for the OData $select query parameter which should be included in the request

custom? Object<string,string>

An optional map of custom query parameters. Custom parameters must not start with $

countMode? sap.ui.model.odata.CountMode

Defines the count mode of this binding; if not specified, the default count mode of the oModel is applied


Methods Overview

Method Description
sap.ui.model.odata.ODataListBinding.extend

Creates a new subclass of class sap.ui.model.odata.ODataListBinding 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.ListBinding.extend.

filter

Filters the list.

When using sap.ui.model.Filter the filters are first grouped according to their binding path. All filters belonging to a group are combined with OR and after that the results of all groups are combined with AND. Usually this means, all filters applied to a single table column are combined with OR, while filters on different table columns are combined with AND. Please note that a custom filter function is not supported.

getContexts

Return contexts for the list

getDownloadUrl

Get a download URL with the specified format considering the sort/filter/custom parameters.

sap.ui.model.odata.ODataListBinding.getMetadata

Returns a metadata object for class sap.ui.model.odata.ODataListBinding.

initialize

Initialize binding. Fires a change if data is already available ($expand) or a refresh. If metadata is not yet available, do nothing, method will be called again when metadata is loaded.

refresh

Refreshes the binding, checks whether the model data has been changed and fires a change event if this is the case. For server side models this should refetch the data from the server. To update a control, even if no data has been changed, e.g. to reset a control after failed validation, use the parameter bForceUpdate.

sort

Sorts the list.

sap.ui.model.odata.ODataListBinding.extend

Creates a new subclass of class sap.ui.model.odata.ODataListBinding 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.ListBinding.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

filter

Filters the list.

When using sap.ui.model.Filter the filters are first grouped according to their binding path. All filters belonging to a group are combined with OR and after that the results of all groups are combined with AND. Usually this means, all filters applied to a single table column are combined with OR, while filters on different table columns are combined with AND. Please note that a custom filter function is not supported.

Param Type DefaultValue Description
aFilters sap.ui.model.Filter sap.ui.model.Filter[]

Single filter object or an array of filter objects

sFilterType sap.ui.model.FilterType

Type of the filter which should be adjusted, if it is not given, the standard behaviour applies

getContexts

Return contexts for the list

Param Type DefaultValue Description
iStartIndex int 0

the start index of the requested contexts

iLength int

the requested amount of contexts

iThreshold int 0

getDownloadUrl

Get a download URL with the specified format considering the sort/filter/custom parameters.

Param Type DefaultValue Description
sFormat string

Value for the $format Parameter

sap.ui.model.odata.ODataListBinding.getMetadata

Returns a metadata object for class sap.ui.model.odata.ODataListBinding.

initialize

Initialize binding. Fires a change if data is already available ($expand) or a refresh. If metadata is not yet available, do nothing, method will be called again when metadata is loaded.

refresh

Refreshes the binding, checks whether the model data has been changed and fires a change event if this is the case. For server side models this should refetch the data from the server. To update a control, even if no data has been changed, e.g. to reset a control after failed validation, use the parameter bForceUpdate.

Param Type DefaultValue Description
bForceUpdate boolean

Update the bound control even if no data has been changed

sort

Sorts the list.

Param Type DefaultValue Description
aSorters sap.ui.model.Sorter Array

the Sorter or an array of sorter objects object which define the sort order