List binding implementation for oData format
Method Summary
sap.ui.model.odata.v2.ODataListBinding.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.odata.v2.ODataListBinding with name sClassName
and enriches it with the information contained in oClassInfo
. 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. refresh(bForceUpdate?, sGroupId?)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. attachAggregatedDataStateChange,
attachChange,
attachDataReceived,
attachDataRequested,
attachDataStateChange,
attachEvents,
attachRefresh,
destroy,
detachAggregatedDataStateChange,
detachChange,
detachDataReceived,
detachDataRequested,
detachDataStateChange,
detachEvents,
detachRefresh,
fireDataReceived,
fireDataRequested,
isInitial,
isRelative,
isSuspended,
resume,
suspend,
updateRequired Constructor Detail
new sap.ui.model.odata.v2.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) |
{map} | mParameters? | a map which contains additional parameters for the binding. |
{string} | mParameters.expand? | Standing for OData $expand query option which should be included in the request |
{string} | mParameters.select? | Standing for OData $select query option parameter which should be included in the request |
{map} | mParameters.custom? | an optional map of custom query parameters. Custom parameters must not start with $ . |
{sap.ui.model.odata.CountMode} | mParameters.countMode? | defines the count mode of this binding |
{sap.ui.model.odata.OperationMode} | mParameters.operationMode? | defines the operation mode of this binding |
{boolean} | mParameters.faultTolerant? | turns on the fault tolerance mode, data is not reset if a backend request returns an error |
{string} | mParameters.batchGroupId? | sets the batch group id to be used for requests originating from this binding |
{int} | mParameters.threshold? | a threshold which will be used if the OperationMode is set to "Auto". In case of OperationMode.Auto, the binding tries to fetch (at least) as many entries as the threshold. Also see API documentation for sap.ui.model.OperationMode.Auto. |
Method Detail
sap.ui.model.odata.v2.ODataListBinding.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.odata.v2.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 |
Returns a metadata object for class sap.ui.model.odata.v2.ODataListBinding.
Returns:
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 only supported with operation mode sap.ui.model.odata.OperationMode.Client
.
Parameters:
Returns:
Return contexts for the list
Parameters:
{int} | iStartIndex? | the start index of the requested contexts |
{int} | iLength? | the requested amount of contexts |
{int} | iThreshold? | The threshold value |
Returns:
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 |
getLength(): number
Return the length of the list.
In case the final length is unknown (e.g. when searching on a large dataset), this will return an estimated length.
Returns:
initialize(): sap.ui.model.odata.OdataListBinding
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.
Returns:
{sap.ui.model.odata.OdataListBinding} | oBinding The binding instance |
refresh(bForceUpdate?, sGroupId?)
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 |
{string} | sGroupId? | The group Id for the refresh |
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: