loio |
---|
54e0ddf695af4a6c978472cecb01c64d |
view on: demo kit nightly build | demo kit latest release
Bindings connect OpenUI5 view elements to model data, allowing changes in the model to be reflected in the view element and vice versa.
The OData V4 model supports the following types of binding:
-
List bindings, which represent a collection (of OData entities, complex or primitive types) such as
/SalesOrderList
(see the sap.ui.model.odata.v4.ODataListBinding API documentation in the Demo Kit) -
Context bindings, which represent a single entity such as
/SalesOrderList('0500000000')
or a structural property with complex type (see the sap.ui.model.odata.v4.ODataContextBinding API documentation in the Demo Kit) -
Property bindings, which represent a single, primitive type property in an entity or complex type such as
/ProductList('HT-1000')/Name
(see the sap.ui.model.odata.v4.ODataPropertyBinding API documentation in the Demo Kit) -
Suspend and Resume
A suspended binding does not send data service requests nor does it fire change events. You can resume a suspended list or context binding with itsresume
method. -
Accessing Data in Controller Code
In the OData V4 model, bindings are used to access and modify back-end data also if the data is accessed or modified in controller code. -
Data Reuse
The OData V4 model keeps data with respect to bindings. This allows different views on the same data but also means that data is not automatically shared between bindings. There are mechanisms for sharing data to avoid redundant requests and to keep the same data in different controls in sync.
Related Information
sap.ui.model.odata.v4.ODataListBinding
sap.ui.model.odata.v4.ODataContextBinding
sap.ui.model.odata.v4.ODataPropertyBinding
OData Version 4.0 Part 2: URL Conventions, 4 Resource Path
OData Version 4.0 Part 2: URL Conventions, 5 Query Options
OData Version 4.0 Part 2: URL Conventions, 5.2 Custom Query Options