@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.
Files changed (302) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.reuse/dep5 +1 -1
  3. package/THIRDPARTY.txt +2 -1
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +1 -1
  6. package/src/jquery.sap.properties.js +1 -1
  7. package/src/jquery.sap.resources.js +2 -2
  8. package/src/jquery.sap.script.js +1 -1
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  11. package/src/sap/base/util/restricted/_castArray.js +1 -1
  12. package/src/sap/base/util/restricted/_compact.js +1 -1
  13. package/src/sap/base/util/restricted/_curry.js +1 -1
  14. package/src/sap/base/util/restricted/_debounce.js +1 -1
  15. package/src/sap/base/util/restricted/_difference.js +1 -1
  16. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  18. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  21. package/src/sap/base/util/restricted/_flatten.js +1 -1
  22. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  24. package/src/sap/base/util/restricted/_intersection.js +1 -1
  25. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  27. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  29. package/src/sap/base/util/restricted/_isNil.js +1 -1
  30. package/src/sap/base/util/restricted/_max.js +1 -1
  31. package/src/sap/base/util/restricted/_merge.js +1 -1
  32. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  33. package/src/sap/base/util/restricted/_min.js +1 -1
  34. package/src/sap/base/util/restricted/_omit.js +1 -1
  35. package/src/sap/base/util/restricted/_pick.js +1 -1
  36. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  37. package/src/sap/base/util/restricted/_throttle.js +1 -1
  38. package/src/sap/base/util/restricted/_toArray.js +1 -1
  39. package/src/sap/base/util/restricted/_union.js +1 -1
  40. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  41. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  42. package/src/sap/base/util/restricted/_uniq.js +1 -1
  43. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  45. package/src/sap/base/util/restricted/_without.js +1 -1
  46. package/src/sap/base/util/restricted/_xor.js +1 -1
  47. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  48. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  49. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  51. package/src/sap/ui/Device.js +4 -4
  52. package/src/sap/ui/Global.js +11 -16
  53. package/src/sap/ui/base/Event.js +1 -1
  54. package/src/sap/ui/base/EventProvider.js +1 -1
  55. package/src/sap/ui/base/Interface.js +1 -1
  56. package/src/sap/ui/base/ManagedObject.js +3 -3
  57. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  58. package/src/sap/ui/base/Metadata.js +1 -3
  59. package/src/sap/ui/base/Object.js +1 -1
  60. package/src/sap/ui/base/ObjectPool.js +1 -1
  61. package/src/sap/ui/core/.library +1 -27
  62. package/src/sap/ui/core/AppCacheBuster.js +4 -4
  63. package/src/sap/ui/core/BusyIndicator.js +1 -1
  64. package/src/sap/ui/core/Component.js +31 -9
  65. package/src/sap/ui/core/ComponentContainer.js +1 -1
  66. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  67. package/src/sap/ui/core/ComponentSupport.js +1 -1
  68. package/src/sap/ui/core/Control.js +2 -2
  69. package/src/sap/ui/core/Core.js +2 -2
  70. package/src/sap/ui/core/CustomData.js +1 -1
  71. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  72. package/src/sap/ui/core/Element.js +2 -6
  73. package/src/sap/ui/core/ElementMetadata.js +1 -1
  74. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  75. package/src/sap/ui/core/EventBus.js +1 -1
  76. package/src/sap/ui/core/Fragment.js +1 -1
  77. package/src/sap/ui/core/HTML.js +3 -3
  78. package/src/sap/ui/core/History.js +1 -1
  79. package/src/sap/ui/core/Icon.js +1 -1
  80. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  81. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  82. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  83. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  84. package/src/sap/ui/core/InvisibleText.js +1 -1
  85. package/src/sap/ui/core/Item.js +1 -1
  86. package/src/sap/ui/core/LabelEnablement.js +1 -1
  87. package/src/sap/ui/core/LayoutData.js +1 -1
  88. package/src/sap/ui/core/ListItem.js +1 -1
  89. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  90. package/src/sap/ui/core/Locale.js +1 -1
  91. package/src/sap/ui/core/LocaleData.js +3 -3
  92. package/src/sap/ui/core/Manifest.js +1 -1
  93. package/src/sap/ui/core/Message.js +1 -1
  94. package/src/sap/ui/core/RenderManager.js +3 -3
  95. package/src/sap/ui/core/Renderer.js +1 -1
  96. package/src/sap/ui/core/ResizeHandler.js +1 -1
  97. package/src/sap/ui/core/ScrollBar.js +4 -3
  98. package/src/sap/ui/core/SeparatorItem.js +1 -1
  99. package/src/sap/ui/core/ThemeCheck.js +2 -2
  100. package/src/sap/ui/core/Title.js +1 -1
  101. package/src/sap/ui/core/TooltipBase.js +1 -1
  102. package/src/sap/ui/core/UIArea.js +3 -3
  103. package/src/sap/ui/core/UIComponent.js +1 -1
  104. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  105. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  106. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  107. package/src/sap/ui/core/XMLComposite.js +1 -1
  108. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  109. package/src/sap/ui/core/XMLTemplateProcessor.js +19 -5
  110. package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
  111. package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
  112. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  113. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  114. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  115. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  116. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  117. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  118. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  119. package/src/sap/ui/core/library.js +5 -5
  120. package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
  121. package/src/sap/ui/core/message/Message.js +1 -1
  122. package/src/sap/ui/core/message/MessageManager.js +1 -1
  123. package/src/sap/ui/core/message/MessageParser.js +1 -1
  124. package/src/sap/ui/core/message/MessageProcessor.js +22 -12
  125. package/src/sap/ui/core/messagebundle_fr.properties +7 -7
  126. package/src/sap/ui/core/messagebundle_ru.properties +21 -21
  127. package/src/sap/ui/core/mvc/Controller.js +4 -4
  128. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  129. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  130. package/src/sap/ui/core/mvc/JSView.js +1 -1
  131. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  132. package/src/sap/ui/core/mvc/View.js +1 -1
  133. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  134. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  135. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  136. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  137. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  138. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  139. package/src/sap/ui/core/rules/Misc.support.js +51 -1
  140. package/src/sap/ui/core/rules/Rendering.support.js +1 -4
  141. package/src/sap/ui/core/rules/View.support.js +14 -46
  142. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  143. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  144. package/src/sap/ui/core/service/Service.js +1 -1
  145. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  146. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  147. package/src/sap/ui/core/support/Plugin.js +2 -2
  148. package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
  149. package/src/sap/ui/core/support/Support.js +1 -1
  150. package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
  151. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  152. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  153. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  154. package/src/sap/ui/core/support/plugins/Performance.js +1 -2
  155. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  156. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  157. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  158. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  159. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
  160. package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
  161. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  162. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  163. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  164. package/src/sap/ui/core/tmpl/Template.js +1 -1
  165. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  166. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  167. package/src/sap/ui/core/util/Export.js +1 -1
  168. package/src/sap/ui/core/util/ExportCell.js +1 -1
  169. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  170. package/src/sap/ui/core/util/ExportRow.js +1 -1
  171. package/src/sap/ui/core/util/ExportType.js +1 -1
  172. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  173. package/src/sap/ui/core/util/File.js +1 -1
  174. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  175. package/src/sap/ui/core/util/MockServer.js +2 -2
  176. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  177. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +4 -4
  178. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  179. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  180. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  181. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  182. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  183. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  184. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  185. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  186. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  187. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  188. package/src/sap/ui/debug/ControlTree.js +1 -1
  189. package/src/sap/ui/debug/DebugEnv.js +1 -1
  190. package/src/sap/ui/debug/PropertyList.js +1 -1
  191. package/src/sap/ui/model/ChangeReason.js +1 -1
  192. package/src/sap/ui/model/ClientListBinding.js +7 -0
  193. package/src/sap/ui/model/ClientModel.js +6 -5
  194. package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
  195. package/src/sap/ui/model/CompositeDataState.js +1 -1
  196. package/src/sap/ui/model/CompositeType.js +1 -1
  197. package/src/sap/ui/model/DataState.js +1 -1
  198. package/src/sap/ui/model/ListBinding.js +24 -5
  199. package/src/sap/ui/model/MetaModel.js +1 -1
  200. package/src/sap/ui/model/Model.js +5 -10
  201. package/src/sap/ui/model/SelectionModel.js +1 -1
  202. package/src/sap/ui/model/SimpleType.js +1 -1
  203. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  204. package/src/sap/ui/model/TreeBindingAdapter.js +0 -2
  205. package/src/sap/ui/model/TreeBindingUtils.js +2 -0
  206. package/src/sap/ui/model/Type.js +1 -1
  207. package/src/sap/ui/model/analytics/AnalyticalBinding.js +12 -6
  208. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
  209. package/src/sap/ui/model/json/JSONModel.js +7 -7
  210. package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
  211. package/src/sap/ui/model/message/MessageModel.js +3 -3
  212. package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
  213. package/src/sap/ui/model/odata/AnnotationHelper.js +2 -2
  214. package/src/sap/ui/model/odata/AnnotationParser.js +4 -2
  215. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  216. package/src/sap/ui/model/odata/ODataListBinding.js +61 -38
  217. package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
  218. package/src/sap/ui/model/odata/ODataMetaModel.js +3 -3
  219. package/src/sap/ui/model/odata/ODataMetadata.js +136 -85
  220. package/src/sap/ui/model/odata/ODataModel.js +442 -215
  221. package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
  222. package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +27 -17
  223. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +440 -260
  224. package/src/sap/ui/model/odata/ODataUtils.js +24 -9
  225. package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +2 -1
  226. package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +10 -8
  227. package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
  228. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  229. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  230. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  231. package/src/sap/ui/model/odata/type/Date.js +1 -1
  232. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  233. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  234. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  235. package/src/sap/ui/model/odata/type/Decimal.js +5 -1
  236. package/src/sap/ui/model/odata/type/Double.js +1 -1
  237. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  238. package/src/sap/ui/model/odata/type/Int.js +1 -1
  239. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  240. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  241. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  242. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  243. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  244. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  245. package/src/sap/ui/model/odata/type/Single.js +1 -1
  246. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  247. package/src/sap/ui/model/odata/type/String.js +1 -1
  248. package/src/sap/ui/model/odata/type/Time.js +1 -1
  249. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  250. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  251. package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
  252. package/src/sap/ui/model/odata/v2/Context.js +42 -11
  253. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  254. package/src/sap/ui/model/odata/v2/ODataListBinding.js +205 -88
  255. package/src/sap/ui/model/odata/v2/ODataModel.js +154 -89
  256. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +162 -89
  257. package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +52 -2
  258. package/src/sap/ui/model/odata/v4/Context.js +48 -7
  259. package/src/sap/ui/model/odata/v4/ODataBinding.js +55 -24
  260. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +67 -19
  261. package/src/sap/ui/model/odata/v4/ODataListBinding.js +211 -78
  262. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
  263. package/src/sap/ui/model/odata/v4/ODataModel.js +2 -1
  264. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +36 -23
  265. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
  266. package/src/sap/ui/model/odata/v4/lib/_Cache.js +106 -11
  267. package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -3
  268. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +11 -2
  269. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  270. package/src/sap/ui/model/type/Boolean.js +1 -1
  271. package/src/sap/ui/model/type/Currency.js +1 -1
  272. package/src/sap/ui/model/type/Date.js +1 -1
  273. package/src/sap/ui/model/type/DateInterval.js +1 -1
  274. package/src/sap/ui/model/type/DateTime.js +1 -1
  275. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  276. package/src/sap/ui/model/type/FileSize.js +1 -1
  277. package/src/sap/ui/model/type/Float.js +1 -1
  278. package/src/sap/ui/model/type/Integer.js +1 -1
  279. package/src/sap/ui/model/type/String.js +1 -1
  280. package/src/sap/ui/model/type/Time.js +1 -1
  281. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  282. package/src/sap/ui/model/type/Unit.js +1 -1
  283. package/src/sap/ui/model/xml/XMLModel.js +5 -5
  284. package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
  285. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  286. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  287. package/src/sap/ui/test/actions/Action.js +9 -2
  288. package/src/sap/ui/test/actions/Press.js +28 -1
  289. package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
  290. package/src/sap/ui/util/Mobile.js +28 -39
  291. package/src/sap/ui/util/Storage.js +1 -1
  292. package/src/ui5loader.js +6 -6
  293. package/ui5.yaml +244 -1
  294. package/src/sap/ui/core/CustomizingConfiguration.js +0 -47
  295. package/src/sap/ui/thirdparty/baseuri.js +0 -1
  296. package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
  297. package/src/sap/ui/thirdparty/es6-promise.js +0 -1
  298. package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
  299. package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
  300. package/src/sap/ui/thirdparty/flexie.js +0 -1
  301. package/src/sap/ui/thirdparty/unorm.js +0 -1
  302. 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.96.2
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
- * @returns {sap.ui.model.odata.lib._Cache}
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 (this.mLateQueryOptions) {
299
- oCache.setLateQueryOptions(this.mLateQueryOptions);
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("") || this.hasPendingChangesInDependents());
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.96.2
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, "", undefined, function () {
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 the binding's root binding is suspended, the given group ID is invalid, if
843
- * the binding is not a deferred operation binding (see
844
- * {@link sap.ui.model.odata.v4.ODataContextBinding}), if the binding is unresolved (see
845
- * {@link sap.ui.model.Binding#isResolved}) or relative to a transient context (see
846
- * {@link sap.ui.model.odata.v4.Context#isTransient}), or if deferred operation bindings are
847
- * nested, or if the OData resource path for a deferred operation binding's context cannot be
848
- * determined, or if <code>fnOnStrictHandlingFailed</code> is called and does not return a
849
- * <code>Promise</code>.
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;