Beruflich Dokumente
Kultur Dokumente
1a010d3b92c34226a96f202ec27e9217
view on: demo kit nightly build | demo kit latest release
Binding Events
The OData V4 model supports certain events intended for applications, and others that are
to be used for controls, as outlined in this section.
– The dataRequested event is fired directly after data has been requested from a
back end.
– The dataReceived event is fired after the back-end data has been processed.
Note that the dataReceived event is also fired after a back-end request has
failed. The error of the failed request is passed to the event handler as an error
parameter.
For more details, see the corresponding API documentation for the specific bindings
ODataPropertyBinding, ODataContextBinding and ODataListBinding in the Demo Kit.
– The createSent event is fired each time a POST request that is triggered for an
ODataListBinding#create is sent to the backend.
– The createCompleted event is fired each time the backend has responded to a
POST request triggered for an ODataListBinding#create.
• The patchSent and patchCompleted events are typically used by applications that are
using update groups with submit mode Auto (which is the default) and which need to
be informed when PATCH requests are sent to the back end and when they are
processed. For example, these events can be used to display a DraftIndicator to
inform the user that his changes are being saved and when saving is finished.
– The patchSent event is fired when the first PATCH request for this binding is
sent to the backend.
– The patchCompleted event is fired when the backend has responded to the last
PATCH request for this binding.
For more details, see the corresponding API documentation for the specific bindings
ODataContextBinding and ODataListBinding in the Demo Kit.
• When a relative binding gets a new context, it fires a change event with the parameter
reason set to sap.ui.model.ChangeReason.Context .
• When a binding is refreshed, the event fired depends on the binding type, as follows:
For more details, see the corresponding API documentation for the specific bindings
ODataPropertyBinding, ODataContextBinding and ODataListBinding, as well as
sap.ui.model.ChangeReason in the Demo Kit.
Related information
ODataPropertyBinding
ODataContextBinding
ODataListBinding
sap.ui.model.ChangeReason