@openui5/sap.ui.core 1.96.2 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -2
- package/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +2 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +2 -2
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +4 -4
- package/src/sap/ui/Global.js +11 -16
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +3 -3
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -3
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -27
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +31 -9
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Control.js +2 -2
- package/src/sap/ui/core/Core.js +2 -2
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +2 -6
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +3 -3
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +3 -3
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +3 -3
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +4 -3
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +2 -2
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +3 -3
- package/src/sap/ui/core/UIComponent.js +1 -1
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +19 -5
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
- package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +5 -5
- package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +22 -12
- package/src/sap/ui/core/messagebundle_fr.properties +7 -7
- package/src/sap/ui/core/messagebundle_ru.properties +21 -21
- package/src/sap/ui/core/mvc/Controller.js +4 -4
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +51 -1
- package/src/sap/ui/core/rules/Rendering.support.js +1 -4
- package/src/sap/ui/core/rules/View.support.js +14 -46
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -2
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +2 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +4 -4
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +7 -0
- package/src/sap/ui/model/ClientModel.js +6 -5
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +24 -5
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -10
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +0 -2
- package/src/sap/ui/model/TreeBindingUtils.js +2 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +12 -6
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
- package/src/sap/ui/model/json/JSONModel.js +7 -7
- package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +3 -3
- package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +2 -2
- package/src/sap/ui/model/odata/AnnotationParser.js +4 -2
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +61 -38
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +3 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +136 -85
- package/src/sap/ui/model/odata/ODataModel.js +442 -215
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +27 -17
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +440 -260
- package/src/sap/ui/model/odata/ODataUtils.js +24 -9
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +2 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +10 -8
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +5 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
- package/src/sap/ui/model/odata/v2/Context.js +42 -11
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +205 -88
- package/src/sap/ui/model/odata/v2/ODataModel.js +154 -89
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +162 -89
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +52 -2
- package/src/sap/ui/model/odata/v4/Context.js +48 -7
- package/src/sap/ui/model/odata/v4/ODataBinding.js +55 -24
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +67 -19
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +211 -78
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +2 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +36 -23
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +106 -11
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -3
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +11 -2
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +5 -5
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/actions/Action.js +9 -2
- package/src/sap/ui/test/actions/Press.js +28 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
- package/src/sap/ui/util/Mobile.js +28 -39
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +6 -6
- package/ui5.yaml +244 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +0 -47
- package/src/sap/ui/thirdparty/baseuri.js +0 -1
- package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
- package/src/sap/ui/thirdparty/es6-promise.js +0 -1
- package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
- package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
- package/src/sap/ui/thirdparty/flexie.js +0 -1
- package/src/sap/ui/thirdparty/unorm.js +0 -1
- package/src/sap/ui/thirdparty/unormdata.js +0 -1
|
@@ -98,7 +98,7 @@ sap.ui.define([
|
|
|
98
98
|
* @hideconstructor
|
|
99
99
|
* @public
|
|
100
100
|
* @since 1.39.0
|
|
101
|
-
* @version 1.
|
|
101
|
+
* @version 1.97.0
|
|
102
102
|
*/
|
|
103
103
|
var Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
|
|
104
104
|
constructor : function (oModel, oBinding, sPath, iIndex, oCreatePromise, iGeneration) {
|
|
@@ -131,6 +131,9 @@ sap.ui.define([
|
|
|
131
131
|
* An entity with the ETag of the binding for which the deletion was requested. This is
|
|
132
132
|
* provided if the deletion is delegated from a context binding with empty path to a list
|
|
133
133
|
* binding.
|
|
134
|
+
* @param {boolean} [bDoNotRequestCount]
|
|
135
|
+
* Whether not to request the new count from the server; useful in case of
|
|
136
|
+
* {@link #replaceWith} where it is known that the count remains unchanged
|
|
134
137
|
* @returns {Promise}
|
|
135
138
|
* A promise which is resolved without a result in case of success, or rejected with an
|
|
136
139
|
* instance of <code>Error</code> in case of failure
|
|
@@ -138,14 +141,15 @@ sap.ui.define([
|
|
|
138
141
|
* @private
|
|
139
142
|
* @see sap.ui.model.odata.v4.Context#delete
|
|
140
143
|
*/
|
|
141
|
-
Context.prototype._delete = function (oGroupLock, oETagEntity) {
|
|
144
|
+
Context.prototype._delete = function (oGroupLock, oETagEntity, bDoNotRequestCount) {
|
|
142
145
|
var that = this;
|
|
143
146
|
|
|
144
147
|
if (this.isTransient()) {
|
|
145
|
-
return this.oBinding._delete(oGroupLock, "n/a", this);
|
|
148
|
+
return this.oBinding._delete(oGroupLock, "n/a", this, bDoNotRequestCount);
|
|
146
149
|
}
|
|
147
150
|
return this.fetchCanonicalPath().then(function (sCanonicalPath) {
|
|
148
|
-
return that.oBinding._delete(oGroupLock, sCanonicalPath.slice(1), that, oETagEntity
|
|
151
|
+
return that.oBinding._delete(oGroupLock, sCanonicalPath.slice(1), that, oETagEntity,
|
|
152
|
+
bDoNotRequestCount);
|
|
149
153
|
});
|
|
150
154
|
};
|
|
151
155
|
|
|
@@ -253,6 +257,9 @@ sap.ui.define([
|
|
|
253
257
|
* the context's binding is used, see {@link #getUpdateGroupId}; the resulting group ID must
|
|
254
258
|
* not have {@link sap.ui.model.odata.v4.SubmitMode.API}. Since 1.81, if this context is
|
|
255
259
|
* transient (see {@link #isTransient}), no group ID needs to be specified.
|
|
260
|
+
* @param {boolean} [bDoNotRequestCount]
|
|
261
|
+
* Whether not to request the new count from the server; useful in case of
|
|
262
|
+
* {@link #replaceWith} where it is known that the count remains unchanged (since 1.97.0)
|
|
256
263
|
* @returns {Promise}
|
|
257
264
|
* A promise which is resolved without a result in case of success, or rejected with an
|
|
258
265
|
* instance of <code>Error</code> in case of failure, e.g. if the given context does not point
|
|
@@ -273,7 +280,7 @@ sap.ui.define([
|
|
|
273
280
|
* @public
|
|
274
281
|
* @since 1.41.0
|
|
275
282
|
*/
|
|
276
|
-
Context.prototype.delete = function (sGroupId) {
|
|
283
|
+
Context.prototype.delete = function (sGroupId, bDoNotRequestCount) {
|
|
277
284
|
var oGroupLock,
|
|
278
285
|
oModel = this.oModel,
|
|
279
286
|
that = this;
|
|
@@ -287,7 +294,7 @@ sap.ui.define([
|
|
|
287
294
|
}
|
|
288
295
|
oGroupLock = this.oBinding.lockGroup(sGroupId, true, true);
|
|
289
296
|
|
|
290
|
-
return this._delete(oGroupLock).then(function () {
|
|
297
|
+
return this._delete(oGroupLock, /*oETagEntity*/null, bDoNotRequestCount).then(function () {
|
|
291
298
|
var sResourcePathPrefix = that.sPath.slice(1);
|
|
292
299
|
|
|
293
300
|
// Messages have been updated via _Cache#_delete; "that" is already destroyed; remove
|
|
@@ -411,7 +418,7 @@ sap.ui.define([
|
|
|
411
418
|
return oCache.update(oGroupLock, oResult.propertyPath, vValue,
|
|
412
419
|
bSkipRetry ? undefined : errorCallback, oResult.editUrl, sEntityPath,
|
|
413
420
|
oMetaModel.getUnitOrCurrencyPath(that.oModel.resolve(sPath, that)),
|
|
414
|
-
oBinding.isPatchWithoutSideEffects(), patchSent
|
|
421
|
+
oBinding.isPatchWithoutSideEffects(), patchSent, that.isKeepAlive.bind(that)
|
|
415
422
|
).then(function () {
|
|
416
423
|
firePatchCompleted(true);
|
|
417
424
|
}, function (oError) {
|
|
@@ -898,6 +905,38 @@ sap.ui.define([
|
|
|
898
905
|
);
|
|
899
906
|
};
|
|
900
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Replaces this context with the given other context. You probably want to delete this context
|
|
910
|
+
* afterwards without requesting the new count from the server, see the
|
|
911
|
+
* <code>bDoNotRequestCount</code> parameter of {@link #delete}.
|
|
912
|
+
*
|
|
913
|
+
* @param {sap.ui.model.odata.v4.Context} oOtherContext - The other context
|
|
914
|
+
* @throws {Error} If
|
|
915
|
+
* <ul>
|
|
916
|
+
* <li> this context's root binding is suspended,
|
|
917
|
+
* <li> this context is transient (see {@link #isTransient}),
|
|
918
|
+
* <li> the given other context does not belong to the same list binding as this context, or
|
|
919
|
+
* is already in the collection (has an index, see {@link #getIndex}).
|
|
920
|
+
* </ul>
|
|
921
|
+
*
|
|
922
|
+
* @public
|
|
923
|
+
* @since 1.97.0
|
|
924
|
+
*/
|
|
925
|
+
Context.prototype.replaceWith = function (oOtherContext) {
|
|
926
|
+
var oElement;
|
|
927
|
+
|
|
928
|
+
this.oBinding.checkSuspended();
|
|
929
|
+
if (this.isTransient()) {
|
|
930
|
+
throw new Error("Cannot replace a transient context: " + this);
|
|
931
|
+
}
|
|
932
|
+
if (oOtherContext.oBinding !== this.oBinding || oOtherContext.iIndex !== undefined) {
|
|
933
|
+
throw new Error("Cannot replace with " + oOtherContext);
|
|
934
|
+
}
|
|
935
|
+
oElement = oOtherContext.getValue();
|
|
936
|
+
this.oBinding.doReplaceWith(this, oElement,
|
|
937
|
+
_Helper.getPrivateAnnotation(oElement, "predicate"));
|
|
938
|
+
};
|
|
939
|
+
|
|
901
940
|
/**
|
|
902
941
|
* Returns a promise for the "canonical path" of the entity for this context.
|
|
903
942
|
* According to "4.3.1 Canonical URL" of the specification "OData Version 4.0 Part 2: URL
|
|
@@ -1344,6 +1383,8 @@ sap.ui.define([
|
|
|
1344
1383
|
* <li> a key property of the entity has not been requested,
|
|
1345
1384
|
* <li> the list binding is relative and does not use the <code>$$ownRequest</code>
|
|
1346
1385
|
* parameter (see {@link sap.ui.model.odata.v4.ODataModel#bindList}),
|
|
1386
|
+
* <li> the list binding uses or inherits the <code>$$sharedRequest</code> parameter
|
|
1387
|
+
* (see {@link sap.ui.model.odata.v4.ODataModel#bindList}),
|
|
1347
1388
|
* <li> the list binding uses data aggregation
|
|
1348
1389
|
* (see {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation}),
|
|
1349
1390
|
* <li> messages are requested, but the model does not use the <code>autoExpandSelect</code>
|
|
@@ -255,12 +255,17 @@ sap.ui.define([
|
|
|
255
255
|
* The resource path
|
|
256
256
|
* @param {sap.ui.model.Context} [oContext]
|
|
257
257
|
* The context instance to be used, undefined for absolute bindings
|
|
258
|
-
* @
|
|
258
|
+
* @param {boolean} [bOldCacheReadOnly]
|
|
259
|
+
* Whether the old cache is read-only and must be kept intact - not reset and reused!
|
|
260
|
+
* @param {sap.ui.model.odata.v4.lib._Cache} [oOldCache]
|
|
261
|
+
* The old cache, in case it may be reused
|
|
262
|
+
* @returns {sap.ui.model.odata.v4.lib._Cache}
|
|
259
263
|
* The cache
|
|
260
264
|
*
|
|
261
265
|
* @private
|
|
262
266
|
*/
|
|
263
|
-
ODataBinding.prototype.createAndSetCache = function (mQueryOptions, sResourcePath, oContext
|
|
267
|
+
ODataBinding.prototype.createAndSetCache = function (mQueryOptions, sResourcePath, oContext,
|
|
268
|
+
bOldCacheReadOnly, oOldCache) {
|
|
264
269
|
var oCache, sDeepResourcePath, iGeneration;
|
|
265
270
|
|
|
266
271
|
this.mCacheQueryOptions = Object.assign({}, this.oModel.mUriParameters, mQueryOptions);
|
|
@@ -284,7 +289,7 @@ sap.ui.define([
|
|
|
284
289
|
} else {
|
|
285
290
|
sDeepResourcePath = _Helper.buildPath(oContext.getPath(), this.sPath).slice(1);
|
|
286
291
|
oCache = this.doCreateCache(sResourcePath, this.mCacheQueryOptions, oContext,
|
|
287
|
-
sDeepResourcePath);
|
|
292
|
+
sDeepResourcePath, bOldCacheReadOnly, oOldCache);
|
|
288
293
|
if (!(this.mParameters && this.mParameters.$$sharedRequest)) {
|
|
289
294
|
this.mCacheByResourcePath = this.mCacheByResourcePath || {};
|
|
290
295
|
this.mCacheByResourcePath[sResourcePath] = oCache;
|
|
@@ -293,10 +298,16 @@ sap.ui.define([
|
|
|
293
298
|
oCache.$generation = iGeneration;
|
|
294
299
|
}
|
|
295
300
|
} else { // absolute binding
|
|
296
|
-
oCache = this.doCreateCache(sResourcePath, this.mCacheQueryOptions
|
|
301
|
+
oCache = this.doCreateCache(sResourcePath, this.mCacheQueryOptions, undefined,
|
|
302
|
+
undefined, bOldCacheReadOnly, oOldCache);
|
|
297
303
|
}
|
|
298
|
-
if (
|
|
299
|
-
|
|
304
|
+
if (oOldCache !== oCache) {
|
|
305
|
+
if (oOldCache) {
|
|
306
|
+
oOldCache.setActive(false);
|
|
307
|
+
}
|
|
308
|
+
if (this.mLateQueryOptions) {
|
|
309
|
+
oCache.setLateQueryOptions(this.mLateQueryOptions);
|
|
310
|
+
}
|
|
300
311
|
}
|
|
301
312
|
this.oCache = oCache;
|
|
302
313
|
|
|
@@ -337,6 +348,10 @@ sap.ui.define([
|
|
|
337
348
|
* The context instance to be used, must be <code>undefined</code> for absolute bindings
|
|
338
349
|
* @param {string} [sDeepResourcePath=sResourcePath]
|
|
339
350
|
* The deep resource path to be used to build the target path for bound messages
|
|
351
|
+
* @param {boolean} [bOldCacheReadOnly]
|
|
352
|
+
* Whether the old cache is read-only and must be kept intact - not reset and reused!
|
|
353
|
+
* @param {sap.ui.model.odata.v4.lib._Cache} [oOldCache]
|
|
354
|
+
* The old cache, in case it may be reused
|
|
340
355
|
* @returns {sap.ui.model.odata.v4.lib._Cache}
|
|
341
356
|
* The new cache instance
|
|
342
357
|
*
|
|
@@ -387,15 +402,22 @@ sap.ui.define([
|
|
|
387
402
|
* @param {boolean} [bKeepQueryOptions]
|
|
388
403
|
* Whether to keep existing (late) query options and not to run auto-$expand/$select again
|
|
389
404
|
* (cannot be combined with <code>bIgnoreParentCache</code>!)
|
|
405
|
+
* @param {boolean} [bKeepCacheOnError]
|
|
406
|
+
* If <code>true</code>, the binding data remains unchanged if the refresh fails. This implies
|
|
407
|
+
* that the old cache must be kept intact - not reset and reused!
|
|
390
408
|
* @throws {Error}
|
|
391
409
|
* If auto-$expand/$select is still running and query options shall be kept (this case is just
|
|
392
410
|
* not yet implemented and should not be needed)
|
|
393
411
|
*
|
|
394
412
|
* @private
|
|
395
413
|
*/
|
|
396
|
-
ODataBinding.prototype.fetchCache = function (oContext, bIgnoreParentCache, bKeepQueryOptions
|
|
414
|
+
ODataBinding.prototype.fetchCache = function (oContext, bIgnoreParentCache, bKeepQueryOptions,
|
|
415
|
+
bKeepCacheOnError) {
|
|
397
416
|
var oCache = this.oCache,
|
|
398
|
-
oCallToken = {
|
|
417
|
+
oCallToken = {
|
|
418
|
+
// propagate old cache from first call of fetchCache to the latest call
|
|
419
|
+
oOldCache : oCache === undefined ? this.oFetchCacheCallToken.oOldCache : oCache
|
|
420
|
+
},
|
|
399
421
|
aPromises,
|
|
400
422
|
that = this;
|
|
401
423
|
|
|
@@ -403,25 +425,21 @@ sap.ui.define([
|
|
|
403
425
|
oContext = undefined;
|
|
404
426
|
}
|
|
405
427
|
|
|
406
|
-
if (oCache) {
|
|
407
|
-
// if oCachePromise is pending no cache will be created because of oFetchCacheCallToken
|
|
408
|
-
oCache.setActive(false);
|
|
409
|
-
} else if (bKeepQueryOptions) {
|
|
428
|
+
if (!oCache && bKeepQueryOptions) {
|
|
410
429
|
if (oCache === undefined) {
|
|
411
430
|
throw new Error("Unsupported bKeepQueryOptions while oCachePromise is pending");
|
|
412
431
|
}
|
|
413
|
-
this.oFetchCacheCallToken = undefined;
|
|
414
432
|
return;
|
|
415
433
|
}
|
|
416
434
|
|
|
417
435
|
this.oCache = undefined;
|
|
436
|
+
this.oFetchCacheCallToken = oCallToken;
|
|
418
437
|
if (bKeepQueryOptions) {
|
|
419
438
|
// asynchronously re-create an equivalent cache
|
|
420
439
|
this.oCachePromise = SyncPromise.resolve(Promise.resolve()).then(function () {
|
|
421
440
|
return that.createAndSetCache(that.mCacheQueryOptions, oCache.getResourcePath(),
|
|
422
|
-
oContext);
|
|
441
|
+
oContext, bKeepCacheOnError, oCache);
|
|
423
442
|
});
|
|
424
|
-
this.oFetchCacheCallToken = undefined;
|
|
425
443
|
return;
|
|
426
444
|
}
|
|
427
445
|
|
|
@@ -430,7 +448,6 @@ sap.ui.define([
|
|
|
430
448
|
this.oModel.oRequestor.ready()
|
|
431
449
|
];
|
|
432
450
|
this.mCacheQueryOptions = undefined;
|
|
433
|
-
this.oFetchCacheCallToken = oCallToken;
|
|
434
451
|
this.oCachePromise = SyncPromise.all(aPromises).then(function (aResult) {
|
|
435
452
|
var mQueryOptions = aResult[0].mQueryOptions;
|
|
436
453
|
|
|
@@ -447,7 +464,8 @@ sap.ui.define([
|
|
|
447
464
|
oError.canceled = true;
|
|
448
465
|
throw oError;
|
|
449
466
|
}
|
|
450
|
-
return that.createAndSetCache(mQueryOptions, sResourcePath, oContext
|
|
467
|
+
return that.createAndSetCache(mQueryOptions, sResourcePath, oContext,
|
|
468
|
+
bKeepCacheOnError, oCallToken.oOldCache);
|
|
451
469
|
});
|
|
452
470
|
}
|
|
453
471
|
that.oCache = null;
|
|
@@ -803,15 +821,23 @@ sap.ui.define([
|
|
|
803
821
|
* parent context path of this binding. If this binding is unresolved (see
|
|
804
822
|
* {@link sap.ui.model.Binding#isResolved}), it returns <code>false</code>.
|
|
805
823
|
*
|
|
824
|
+
* @param {boolean} [bIgnoreKeptAlive]
|
|
825
|
+
* Whether to ignore changes which will not be lost by APIs like
|
|
826
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#changeParameters changeParameters},
|
|
827
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#filter filter},
|
|
828
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#sort sort}, or
|
|
829
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#suspend suspend} because they relate to a
|
|
830
|
+
* {@link sap.ui.model.odata.v4.Context#setKeepAlive kept-alive} context of this binding.
|
|
806
831
|
* @returns {boolean}
|
|
807
832
|
* <code>true</code> if the binding is resolved and has pending changes
|
|
808
833
|
*
|
|
809
834
|
* @public
|
|
810
835
|
* @since 1.39.0
|
|
811
836
|
*/
|
|
812
|
-
ODataBinding.prototype.hasPendingChanges = function () {
|
|
837
|
+
ODataBinding.prototype.hasPendingChanges = function (bIgnoreKeptAlive) {
|
|
813
838
|
return this.isResolved()
|
|
814
|
-
&& (this.hasPendingChangesForPath(""
|
|
839
|
+
&& (this.hasPendingChangesForPath("", bIgnoreKeptAlive)
|
|
840
|
+
|| this.hasPendingChangesInDependents(bIgnoreKeptAlive));
|
|
815
841
|
};
|
|
816
842
|
|
|
817
843
|
/**
|
|
@@ -820,20 +846,23 @@ sap.ui.define([
|
|
|
820
846
|
*
|
|
821
847
|
* @param {string} sPath
|
|
822
848
|
* The path (absolute or relative to this binding)
|
|
849
|
+
* @param {boolean} [bIgnoreKeptAlive]
|
|
850
|
+
* Whether to ignore changes which will not be lost by APIs like sort or filter because they
|
|
851
|
+
* relate to a context which is kept alive.
|
|
823
852
|
* @returns {boolean}
|
|
824
853
|
* <code>true</code> if there are pending changes for the path
|
|
825
854
|
*
|
|
826
855
|
* @private
|
|
827
856
|
*/
|
|
828
|
-
ODataBinding.prototype.hasPendingChangesForPath = function (sPath) {
|
|
857
|
+
ODataBinding.prototype.hasPendingChangesForPath = function (sPath, bIgnoreKeptAlive) {
|
|
829
858
|
return this.withCache(function (oCache, sCachePath) {
|
|
830
|
-
return oCache.hasPendingChangesForPath(sCachePath);
|
|
859
|
+
return oCache.hasPendingChangesForPath(sCachePath, bIgnoreKeptAlive);
|
|
831
860
|
}, sPath, true).unwrap();
|
|
832
861
|
};
|
|
833
862
|
|
|
834
863
|
/**
|
|
835
864
|
* Checks whether there are pending changes in caches stored by resource path at this binding
|
|
836
|
-
* which have the given resource path as prefix.
|
|
865
|
+
* which have the given resource path as prefix. Called for unresolved bindings only.
|
|
837
866
|
*
|
|
838
867
|
* @param {string} sResourcePathPrefix
|
|
839
868
|
* The resource path prefix to identify the relevant caches
|
|
@@ -861,6 +890,9 @@ sap.ui.define([
|
|
|
861
890
|
*
|
|
862
891
|
* @returns {boolean}
|
|
863
892
|
* <code>true</code> if this binding has pending changes
|
|
893
|
+
* @param {boolean} [bIgnoreKeptAlive]
|
|
894
|
+
* Whether to ignore changes which will not be lost by APIs like sort or filter because they
|
|
895
|
+
* relate to a context which is kept alive.
|
|
864
896
|
*
|
|
865
897
|
* @abstract
|
|
866
898
|
* @function
|
|
@@ -1077,7 +1109,7 @@ sap.ui.define([
|
|
|
1077
1109
|
if (this.requestSideEffects) {
|
|
1078
1110
|
return this.requestSideEffects(sGroupId, aPaths);
|
|
1079
1111
|
}
|
|
1080
|
-
return this.refreshInternal("", sGroupId, true);
|
|
1112
|
+
return this.refreshInternal("", sGroupId, true, true);
|
|
1081
1113
|
}
|
|
1082
1114
|
// return undefined;
|
|
1083
1115
|
};
|
|
@@ -1298,7 +1330,6 @@ sap.ui.define([
|
|
|
1298
1330
|
"adjustPredicate",
|
|
1299
1331
|
"destroy",
|
|
1300
1332
|
"doDeregisterChangeListener",
|
|
1301
|
-
"fetchCache",
|
|
1302
1333
|
"hasPendingChangesForPath"
|
|
1303
1334
|
].forEach(function (sMethod) { // method not final, allow for "super" calls
|
|
1304
1335
|
asODataBinding.prototype[sMethod] = ODataBinding.prototype[sMethod];
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
107
107
|
* @public
|
|
108
108
|
* @since 1.37.0
|
|
109
|
-
* @version 1.
|
|
109
|
+
* @version 1.97.0
|
|
110
110
|
*
|
|
111
111
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
112
112
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
@@ -234,7 +234,7 @@ sap.ui.define([
|
|
|
234
234
|
// deleteFromCache call below. In Context#delete the error is reported.
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
return this.deleteFromCache(oGroupLock, sEditUrl, "",
|
|
237
|
+
return this.deleteFromCache(oGroupLock, sEditUrl, "", null, false, function () {
|
|
238
238
|
oEmptyPathParentBinding._destroyContextAfterDelete();
|
|
239
239
|
});
|
|
240
240
|
};
|
|
@@ -268,6 +268,10 @@ sap.ui.define([
|
|
|
268
268
|
* actions only
|
|
269
269
|
* @param {function} [fnOnStrictHandlingFailed]
|
|
270
270
|
* Callback for strict handling; supported for actions only
|
|
271
|
+
* @param {boolean} [bReplaceWithRVC]
|
|
272
|
+
* Whether this operation binding's parent context, which must belong to a list binding, is
|
|
273
|
+
* replaced with the operation's return value context (see below) and that new list context is
|
|
274
|
+
* returned instead. Since 1.97.0.
|
|
271
275
|
* @returns {Promise}
|
|
272
276
|
* A promise that is resolved without data or a return value context when the operation call
|
|
273
277
|
* succeeded, or rejected with an instance of <code>Error</code> in case of failure. A return
|
|
@@ -280,7 +284,7 @@ sap.ui.define([
|
|
|
280
284
|
* @see #execute for details
|
|
281
285
|
*/
|
|
282
286
|
ODataContextBinding.prototype._execute = function (oGroupLock, mParameters, bIgnoreETag,
|
|
283
|
-
fnOnStrictHandlingFailed) {
|
|
287
|
+
fnOnStrictHandlingFailed, bReplaceWithRVC) {
|
|
284
288
|
var oMetaModel = this.oModel.getMetaModel(),
|
|
285
289
|
oOperationMetadata,
|
|
286
290
|
oPromise,
|
|
@@ -336,12 +340,25 @@ sap.ui.define([
|
|
|
336
340
|
if (that.oReturnValueContext) {
|
|
337
341
|
that.oReturnValueContext.destroy();
|
|
338
342
|
}
|
|
343
|
+
|
|
344
|
+
if (bReplaceWithRVC) {
|
|
345
|
+
that.oCache = null;
|
|
346
|
+
that.oCachePromise = SyncPromise.resolve(null);
|
|
347
|
+
|
|
348
|
+
return sContextPredicate === sResponsePredicate
|
|
349
|
+
? that.oContext
|
|
350
|
+
: that.oContext.getBinding().doReplaceWith(that.oContext,
|
|
351
|
+
oResponseEntity, sResponsePredicate);
|
|
352
|
+
}
|
|
353
|
+
|
|
339
354
|
that.oReturnValueContext = Context.createNewContext(that.oModel,
|
|
340
355
|
that, getReturnValueContextPath(sResolvedPath, sResponsePredicate));
|
|
341
356
|
// set the resource path for late property requests
|
|
342
357
|
that.oCache.setResourcePath(that.oReturnValueContext.getPath().slice(1));
|
|
343
358
|
|
|
344
359
|
return that.oReturnValueContext;
|
|
360
|
+
} else if (bReplaceWithRVC) {
|
|
361
|
+
throw new Error("Cannot replace w/o return value context");
|
|
345
362
|
}
|
|
346
363
|
});
|
|
347
364
|
}, function (oError) {
|
|
@@ -591,8 +608,7 @@ sap.ui.define([
|
|
|
591
608
|
* <li> a collection-valued parameter for an operation other than a V4 action is encountered,
|
|
592
609
|
* <li> <code>bIgnoreETag</code> is used for an operation other than a bound action,
|
|
593
610
|
* <li> <code>fnOnStrictHandlingFailed</code> is given but the given metadata is not an
|
|
594
|
-
* "Action"
|
|
595
|
-
* <li> <code>fnOnStrictHandlingFailed</code> is given and it does not return a promise.
|
|
611
|
+
* "Action"
|
|
596
612
|
* </ul>
|
|
597
613
|
*
|
|
598
614
|
* @private
|
|
@@ -815,6 +831,19 @@ sap.ui.define([
|
|
|
815
831
|
* repeated <b>without</b> applying the preference or rejected with an <code>Error</code>
|
|
816
832
|
* instance <code>oError</code> where <code>oError.canceled === true</code>.
|
|
817
833
|
* Since 1.92.0.
|
|
834
|
+
* @param {boolean} [bReplaceWithRVC]
|
|
835
|
+
* Whether this operation binding's parent context, which must belong to a list binding, is
|
|
836
|
+
* replaced with the operation's return value context (see below) and that list context is
|
|
837
|
+
* returned instead. The list context may be a newly created context or an existing context.
|
|
838
|
+
* A newly created context has the same <code>keepAlive</code> attribute and
|
|
839
|
+
* <code>fnOnBeforeDestroy</code> function as the parent context, see
|
|
840
|
+
* {@link sap.ui.model.odata.v4.Context#setKeepAlive}; <code>fnOnBeforeDestroy</code> will be
|
|
841
|
+
* called with the new context instance as the only argument in this case. An existing context
|
|
842
|
+
* does not change its <code>keepAlive</code> attribute. In any case, the resulting context
|
|
843
|
+
* takes the place (index, position) of the parent context
|
|
844
|
+
* {@link sap.ui.model.odata.v4.Context#getIndex}. If the parent context has requested
|
|
845
|
+
* messages when it was kept alive, they will be inherited if the $$inheritExpandSelect
|
|
846
|
+
* binding parameter is set to <code>true</code>. Since 1.97.0.
|
|
818
847
|
* @returns {Promise}
|
|
819
848
|
* A promise that is resolved without data or with a return value context when the operation
|
|
820
849
|
* call succeeded, or rejected with an <code>Error</code> instance <code>oError</code> in case
|
|
@@ -826,34 +855,45 @@ sap.ui.define([
|
|
|
826
855
|
* <li> is used for an operation other than an action,
|
|
827
856
|
* <li> another request that applies the preference "handling=strict" exists in a different
|
|
828
857
|
* change set of the same $batch request,
|
|
858
|
+
* <li> it does not return a <code>Promise</code>,
|
|
829
859
|
* <li> returns a <code>Promise</code> that resolves with <code>false</code>. In this case
|
|
830
860
|
* <code>oError.canceled === true</code>.
|
|
831
861
|
* </ul>
|
|
862
|
+
* It is also rejected if <code>bReplaceWithRVC</code> is supplied, and there is no return
|
|
863
|
+
* value context at all or the existing context as described above is currently part of the
|
|
864
|
+
* list's collection (that is, has an index).<br>
|
|
832
865
|
* A return value context is a {@link sap.ui.model.odata.v4.Context} which represents a bound
|
|
833
866
|
* operation response. It is created only if the operation is bound and has a single entity
|
|
834
867
|
* return value from the same entity set as the operation's binding parameter and has a
|
|
835
868
|
* parent context which is a {@link sap.ui.model.odata.v4.Context} and points to an entity
|
|
836
|
-
* from an entity set
|
|
837
|
-
*
|
|
869
|
+
* from an entity set.<br>
|
|
838
870
|
* If a return value context is created, it must be used instead of
|
|
839
871
|
* <code>this.getBoundContext()</code>. All bound messages will be related to the return value
|
|
840
872
|
* context only. Such a message can only be connected to a corresponding control if the
|
|
841
873
|
* control's property bindings use the return value context as binding context.
|
|
842
|
-
* @throws {Error} If
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
|
|
874
|
+
* @throws {Error} If
|
|
875
|
+
* <ul>
|
|
876
|
+
* <li>the binding's root binding is suspended,
|
|
877
|
+
* <li> the given group ID is invalid,
|
|
878
|
+
* <li> the binding is not a deferred operation binding (see
|
|
879
|
+
* {@link sap.ui.model.odata.v4.ODataContextBinding}),
|
|
880
|
+
* <li> the binding is unresolved (see
|
|
881
|
+
* {@link sap.ui.model.Binding#isResolved})
|
|
882
|
+
* <li> the binding is relative to a transient context (see
|
|
883
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient}),
|
|
884
|
+
* <li> deferred operation bindings are nested,
|
|
885
|
+
* <li> the OData resource path for a deferred operation binding's context cannot be
|
|
886
|
+
* determined,
|
|
887
|
+
* <li> <code>bReplaceWithRVC</code> is given, but this operation binding is not relative to
|
|
888
|
+
* a row context of a list binding which uses the <code>$$ownRequest</code> parameter (see
|
|
889
|
+
* {@link sap.ui.model.odata.v4.ODataModel#bindList}) and no data aggregation (see
|
|
890
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation}).
|
|
851
891
|
*
|
|
852
892
|
* @public
|
|
853
893
|
* @since 1.37.0
|
|
854
894
|
*/
|
|
855
895
|
ODataContextBinding.prototype.execute = function (sGroupId, bIgnoreETag,
|
|
856
|
-
fnOnStrictHandlingFailed) {
|
|
896
|
+
fnOnStrictHandlingFailed, bReplaceWithRVC) {
|
|
857
897
|
var sResolvedPath = this.getResolvedPath();
|
|
858
898
|
|
|
859
899
|
this.checkSuspended();
|
|
@@ -872,11 +912,19 @@ sap.ui.define([
|
|
|
872
912
|
throw new Error("Nested deferred operation bindings not supported: "
|
|
873
913
|
+ sResolvedPath);
|
|
874
914
|
}
|
|
915
|
+
if (bReplaceWithRVC) {
|
|
916
|
+
if (!this.oContext.getBinding) {
|
|
917
|
+
throw new Error("Cannot replace when parent context is not a V4 context");
|
|
918
|
+
}
|
|
919
|
+
this.oContext.getBinding().checkKeepAlive(this.oContext);
|
|
920
|
+
}
|
|
921
|
+
} else if (bReplaceWithRVC) {
|
|
922
|
+
throw new Error("Cannot replace when operation is not relative");
|
|
875
923
|
}
|
|
876
924
|
|
|
877
925
|
return this._execute(this.lockGroup(sGroupId, true),
|
|
878
926
|
_Helper.publicClone(this.oOperation.mParameters, true), bIgnoreETag,
|
|
879
|
-
fnOnStrictHandlingFailed);
|
|
927
|
+
fnOnStrictHandlingFailed, bReplaceWithRVC);
|
|
880
928
|
};
|
|
881
929
|
|
|
882
930
|
/**
|
|
@@ -1245,7 +1293,7 @@ sap.ui.define([
|
|
|
1245
1293
|
bHasChangeListeners = oCache.hasChangeListeners();
|
|
1246
1294
|
// remove all cached Caches before fetching a new one
|
|
1247
1295
|
that.removeCachesAndMessages(sResourcePathPrefix);
|
|
1248
|
-
that.fetchCache(that.oContext);
|
|
1296
|
+
that.fetchCache(that.oContext, false, false, bKeepCacheOnError);
|
|
1249
1297
|
// Do not fire a change event, or else ManagedObject destroys and recreates the
|
|
1250
1298
|
// binding hierarchy causing a flood of events.
|
|
1251
1299
|
oPromise = bHasChangeListeners ? that.createRefreshPromise() : undefined;
|