Class sap.ui.model.odata.ODataListBindingModule: sap/ui/model/odata/ODataListBinding

extends ListBinding

List binding implementation for oData format

Constructor Summary
new sap.ui.model.odata.ODataListBinding(oModel, sPath, oContext, aSorters?, aFilters?, mParameters?)
Method Summary
sap.ui.model.odata.ODataListBinding.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.odata.ODataListBinding with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.model.odata.ODataListBinding.getMetadata()Returns a metadata object for class sap.ui.model.odata.ODataListBinding.
filter(aFilters, sFilterType)Filters the list.
getContexts(iStartIndex?, iLength?, iThreshold?)Return contexts for the list
getDownloadUrl(sFormat)Get a download URL with the specified format considering the sort/filter/custom parameters.
initialize()Initialize binding.
refresh(bForceUpdate?)Refreshes the binding, check whether the model data has been changed and fire change event if this is the case.
sort(aSorters)Sorts the list.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.model.odata.ODataListBinding(oModel, sPath, oContext, aSorters?, aFilters?, mParameters?)
Parameters:
{sap.ui.model.Model}oModel
{string}sPath
{sap.ui.model.Context}oContext
{array}aSorters? initial sort order (can be either a sorter or an array of sorters)
{array}aFilters? predefined filter/s (can be either a filter or an array of filters)
{object}mParameters?
Method Detail
sap.ui.model.odata.ODataListBinding.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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
sap.ui.model.odata.ODataListBinding.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.odata.ODataListBinding.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
filter(aFilters, sFilterType): sap.ui.model.ListBinding

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.

Parameters:
{sap.ui.model.Filter[]|sap.ui.model.odata.Filter[]}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:
{sap.ui.model.ListBinding} returns this to facilitate method chaining
getContexts(iStartIndex?, iLength?, iThreshold?): sap.ui.model.Context[]
Return contexts for the list
Parameters:
{int}iStartIndex? the start index of the requested contexts
{int}iLength? the requested amount of contexts
{int}iThreshold?
Returns:
{sap.ui.model.Context[]} the array of contexts for each row of the bound list
getDownloadUrl(sFormat): string
Get a download URL with the specified format considering the sort/filter/custom parameters.
Parameters:
{string}sFormat Value for the $format Parameter
Since:
1.24
Returns:
{string} URL which can be used for downloading
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(bForceUpdate?)
Refreshes the binding, check whether the model data has been changed and fire 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, please use the parameter bForceUpdate.
Parameters:
{boolean}bForceUpdate? Update the bound control even if no data has been changed
sort(aSorters): sap.ui.model.ListBinding
Sorts the list.
Parameters:
{sap.ui.model.Sorter|Array}aSorters the Sorter or an array of sorter objects object which define the sort order
Returns:
{sap.ui.model.ListBinding} returns this to facilitate method chaining