@openui5/sap.ui.core 1.102.7 → 1.102.8

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 (248) hide show
  1. package/package.json +1 -1
  2. package/src/jquery.sap.global.js +1 -1
  3. package/src/jquery.sap.properties.js +1 -1
  4. package/src/jquery.sap.resources.js +1 -1
  5. package/src/jquery.sap.script.js +1 -1
  6. package/src/jquery.sap.storage.js +3 -3
  7. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  8. package/src/sap/base/util/restricted/_castArray.js +1 -1
  9. package/src/sap/base/util/restricted/_compact.js +1 -1
  10. package/src/sap/base/util/restricted/_curry.js +1 -1
  11. package/src/sap/base/util/restricted/_debounce.js +1 -1
  12. package/src/sap/base/util/restricted/_difference.js +1 -1
  13. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  14. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  15. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  16. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  17. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  18. package/src/sap/base/util/restricted/_flatten.js +1 -1
  19. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  20. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  21. package/src/sap/base/util/restricted/_intersection.js +1 -1
  22. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  23. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  24. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  25. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  26. package/src/sap/base/util/restricted/_isNil.js +1 -1
  27. package/src/sap/base/util/restricted/_max.js +1 -1
  28. package/src/sap/base/util/restricted/_merge.js +1 -1
  29. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  30. package/src/sap/base/util/restricted/_min.js +1 -1
  31. package/src/sap/base/util/restricted/_omit.js +1 -1
  32. package/src/sap/base/util/restricted/_pick.js +1 -1
  33. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  34. package/src/sap/base/util/restricted/_throttle.js +1 -1
  35. package/src/sap/base/util/restricted/_toArray.js +1 -1
  36. package/src/sap/base/util/restricted/_union.js +1 -1
  37. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  38. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  39. package/src/sap/base/util/restricted/_uniq.js +1 -1
  40. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  41. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  42. package/src/sap/base/util/restricted/_without.js +1 -1
  43. package/src/sap/base/util/restricted/_xor.js +1 -1
  44. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  45. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  46. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  47. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  48. package/src/sap/ui/Device.js +3 -3
  49. package/src/sap/ui/Global.js +4 -4
  50. package/src/sap/ui/base/Event.js +1 -1
  51. package/src/sap/ui/base/EventProvider.js +1 -1
  52. package/src/sap/ui/base/Interface.js +1 -1
  53. package/src/sap/ui/base/ManagedObject.js +1 -1
  54. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  55. package/src/sap/ui/base/Metadata.js +1 -1
  56. package/src/sap/ui/base/Object.js +1 -1
  57. package/src/sap/ui/base/ObjectPool.js +1 -1
  58. package/src/sap/ui/core/.library +1 -1
  59. package/src/sap/ui/core/BusyIndicator.js +1 -1
  60. package/src/sap/ui/core/Component.js +1 -1
  61. package/src/sap/ui/core/ComponentContainer.js +1 -1
  62. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  63. package/src/sap/ui/core/ComponentSupport.js +1 -1
  64. package/src/sap/ui/core/Control.js +1 -1
  65. package/src/sap/ui/core/Core.js +1 -1
  66. package/src/sap/ui/core/CustomData.js +1 -1
  67. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  68. package/src/sap/ui/core/Element.js +1 -1
  69. package/src/sap/ui/core/ElementMetadata.js +1 -1
  70. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  71. package/src/sap/ui/core/EventBus.js +1 -1
  72. package/src/sap/ui/core/FocusHandler.js +51 -6
  73. package/src/sap/ui/core/Fragment.js +1 -1
  74. package/src/sap/ui/core/HTML.js +1 -1
  75. package/src/sap/ui/core/History.js +1 -1
  76. package/src/sap/ui/core/Icon.js +1 -1
  77. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  78. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  79. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  80. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  81. package/src/sap/ui/core/InvisibleText.js +1 -1
  82. package/src/sap/ui/core/Item.js +1 -1
  83. package/src/sap/ui/core/LabelEnablement.js +1 -1
  84. package/src/sap/ui/core/LayoutData.js +1 -1
  85. package/src/sap/ui/core/ListItem.js +1 -1
  86. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  87. package/src/sap/ui/core/Locale.js +1 -1
  88. package/src/sap/ui/core/LocaleData.js +1 -1
  89. package/src/sap/ui/core/Manifest.js +1 -1
  90. package/src/sap/ui/core/Message.js +1 -1
  91. package/src/sap/ui/core/Popup.js +60 -5
  92. package/src/sap/ui/core/RenderManager.js +1 -1
  93. package/src/sap/ui/core/Renderer.js +1 -1
  94. package/src/sap/ui/core/ResizeHandler.js +1 -1
  95. package/src/sap/ui/core/ScrollBar.js +1 -1
  96. package/src/sap/ui/core/SeparatorItem.js +1 -1
  97. package/src/sap/ui/core/Title.js +1 -1
  98. package/src/sap/ui/core/TooltipBase.js +1 -1
  99. package/src/sap/ui/core/UIArea.js +1 -1
  100. package/src/sap/ui/core/UIComponent.js +1 -1
  101. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  102. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  103. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  104. package/src/sap/ui/core/XMLComposite.js +1 -1
  105. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  106. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  107. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  108. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  109. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  110. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  111. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  112. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  113. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  114. package/src/sap/ui/core/library.js +3 -3
  115. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  116. package/src/sap/ui/core/message/Message.js +1 -1
  117. package/src/sap/ui/core/message/MessageManager.js +1 -1
  118. package/src/sap/ui/core/message/MessageParser.js +1 -1
  119. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  120. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  121. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  122. package/src/sap/ui/core/mvc/JSView.js +1 -1
  123. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  124. package/src/sap/ui/core/mvc/View.js +1 -1
  125. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  126. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  127. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  128. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  129. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  130. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  131. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  132. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  133. package/src/sap/ui/core/service/Service.js +1 -1
  134. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  135. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  136. package/src/sap/ui/core/support/Plugin.js +1 -1
  137. package/src/sap/ui/core/support/Support.js +1 -1
  138. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  139. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  140. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  141. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  142. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  143. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  144. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  145. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  146. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  147. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  148. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  149. package/src/sap/ui/core/tmpl/Template.js +1 -1
  150. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  151. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  152. package/src/sap/ui/core/util/Export.js +1 -1
  153. package/src/sap/ui/core/util/ExportCell.js +1 -1
  154. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  155. package/src/sap/ui/core/util/ExportRow.js +1 -1
  156. package/src/sap/ui/core/util/ExportType.js +1 -1
  157. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  158. package/src/sap/ui/core/util/File.js +1 -1
  159. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  160. package/src/sap/ui/core/util/MockServer.js +1 -1
  161. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  162. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  163. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  164. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  165. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  166. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  167. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  168. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  169. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  170. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  171. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  172. package/src/sap/ui/debug/ControlTree.js +1 -1
  173. package/src/sap/ui/debug/DebugEnv.js +1 -1
  174. package/src/sap/ui/debug/PropertyList.js +1 -1
  175. package/src/sap/ui/model/ClientModel.js +1 -1
  176. package/src/sap/ui/model/CompositeDataState.js +1 -1
  177. package/src/sap/ui/model/CompositeType.js +1 -1
  178. package/src/sap/ui/model/DataState.js +1 -1
  179. package/src/sap/ui/model/MetaModel.js +1 -1
  180. package/src/sap/ui/model/Model.js +1 -1
  181. package/src/sap/ui/model/SelectionModel.js +1 -1
  182. package/src/sap/ui/model/SimpleType.js +1 -1
  183. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  184. package/src/sap/ui/model/Type.js +1 -1
  185. package/src/sap/ui/model/analytics/AnalyticalBinding.js +2 -0
  186. package/src/sap/ui/model/json/JSONModel.js +1 -1
  187. package/src/sap/ui/model/message/MessageModel.js +1 -1
  188. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  189. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  190. package/src/sap/ui/model/odata/ODataMetaModel.js +31 -8
  191. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  192. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  193. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  194. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  195. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  196. package/src/sap/ui/model/odata/type/Date.js +1 -1
  197. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  198. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  199. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  200. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  201. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  202. package/src/sap/ui/model/odata/type/Double.js +1 -1
  203. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  204. package/src/sap/ui/model/odata/type/Int.js +1 -1
  205. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  206. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  207. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  208. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  209. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  210. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  211. package/src/sap/ui/model/odata/type/Single.js +1 -1
  212. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  213. package/src/sap/ui/model/odata/type/String.js +1 -1
  214. package/src/sap/ui/model/odata/type/Time.js +1 -1
  215. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  216. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  217. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  218. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  219. package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
  220. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  221. package/src/sap/ui/model/odata/v4/Context.js +1 -1
  222. package/src/sap/ui/model/odata/v4/ODataBinding.js +4 -0
  223. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
  224. package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -39
  225. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +10 -10
  226. package/src/sap/ui/model/odata/v4/ODataModel.js +6 -5
  227. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
  228. package/src/sap/ui/model/odata/v4/lib/_Cache.js +11 -6
  229. package/src/sap/ui/model/odata/v4/lib/_Helper.js +17 -0
  230. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  231. package/src/sap/ui/model/type/Boolean.js +1 -1
  232. package/src/sap/ui/model/type/Currency.js +1 -1
  233. package/src/sap/ui/model/type/Date.js +1 -1
  234. package/src/sap/ui/model/type/DateInterval.js +1 -1
  235. package/src/sap/ui/model/type/DateTime.js +1 -1
  236. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  237. package/src/sap/ui/model/type/FileSize.js +1 -1
  238. package/src/sap/ui/model/type/Float.js +1 -1
  239. package/src/sap/ui/model/type/Integer.js +1 -1
  240. package/src/sap/ui/model/type/String.js +1 -1
  241. package/src/sap/ui/model/type/Time.js +1 -1
  242. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  243. package/src/sap/ui/model/type/Unit.js +1 -1
  244. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  245. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  246. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  247. package/src/sap/ui/test/generic/TestBase.js +1 -1
  248. package/src/sap/ui/util/Storage.js +1 -1
@@ -203,7 +203,7 @@ sap.ui.define([
203
203
  * This model is not prepared to be inherited from.
204
204
  *
205
205
  * @author SAP SE
206
- * @version 1.102.7
206
+ * @version 1.102.8
207
207
  *
208
208
  * @public
209
209
  * @alias sap.ui.model.odata.v2.ODataModel
@@ -94,7 +94,7 @@ sap.ui.define([
94
94
  * @extends sap.ui.model.TreeBinding
95
95
  * @hideconstructor
96
96
  * @public
97
- * @version 1.102.7
97
+ * @version 1.102.8
98
98
  */
99
99
  var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
100
100
 
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @hideconstructor
43
43
  * @public
44
44
  * @since 1.39.0
45
- * @version 1.102.7
45
+ * @version 1.102.8
46
46
  */
47
47
  Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
48
48
  constructor : constructor
@@ -314,6 +314,7 @@ sap.ui.define([
314
314
  undefined, sGroupId, oOldCache);
315
315
  }
316
316
  if (oOldCache && oOldCache !== oCache) {
317
+ oOldCache.deregisterChange("", this);
317
318
  oOldCache.setActive(false);
318
319
  }
319
320
  if (this.mLateQueryOptions) {
@@ -331,9 +332,12 @@ sap.ui.define([
331
332
  * @since 1.66
332
333
  */
333
334
  ODataBinding.prototype.destroy = function () {
335
+ var that = this;
336
+
334
337
  this.mCacheByResourcePath = undefined;
335
338
  this.oCachePromise.then(function (oOldCache) {
336
339
  if (oOldCache) {
340
+ oOldCache.deregisterChange("", that);
337
341
  oOldCache.setActive(false);
338
342
  }
339
343
  }, function () {});
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
75
75
  * @public
76
76
  * @since 1.37.0
77
- * @version 1.102.7
77
+ * @version 1.102.8
78
78
  *
79
79
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
80
80
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
@@ -58,7 +58,7 @@ sap.ui.define([
58
58
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
59
59
  * @public
60
60
  * @since 1.37.0
61
- * @version 1.102.7
61
+ * @version 1.102.8
62
62
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
63
63
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
64
64
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
@@ -146,6 +146,7 @@ sap.ui.define([
146
146
  this.mPreviousContextsByPath = {};
147
147
  this.aPreviousData = [];
148
148
  this.bRefreshKeptElements = false; // refresh kept elements when resuming?
149
+ this.sResumeAction = undefined; // a special resume action for $$sharedRequest
149
150
  this.bSharedRequest = mParameters.$$sharedRequest || oModel.bSharedRequests;
150
151
  this.aSorters = _Helper.toArray(vSorters);
151
152
  this.sUpdateGroupId = mParameters.$$updateGroupId;
@@ -1117,7 +1118,7 @@ sap.ui.define([
1117
1118
  */
1118
1119
  ODataListBinding.prototype.destroyLater = function (oContext) {
1119
1120
  if (this.iCurrentEnd) {
1120
- // Add the context to mPreviousContextsByPath although it definitely won't be reused.
1121
+ // Add the context to mPreviousContextsByPath, although it definitely won't be reused.
1121
1122
  // Then it is destroyed later, but only if there is a listener (iCurrentEnd is set by
1122
1123
  // getContexts and mPreviousContextsByPath is only cleared when getContexts is called)
1123
1124
  this.mPreviousContextsByPath[oContext.getPath()] = oContext;
@@ -1164,6 +1165,7 @@ sap.ui.define([
1164
1165
  ODataListBinding.prototype.doCreateCache = function (sResourcePath, mQueryOptions, oContext,
1165
1166
  sDeepResourcePath, sGroupId, oOldCache) {
1166
1167
  var sBindingPath,
1168
+ oCache,
1167
1169
  aKeptElementPaths,
1168
1170
  that = this;
1169
1171
 
@@ -1188,10 +1190,15 @@ sap.ui.define([
1188
1190
 
1189
1191
  mQueryOptions = this.inheritQueryOptions(mQueryOptions, oContext);
1190
1192
 
1191
- return this.getCacheAndMoveKeepAliveContexts(sResourcePath, mQueryOptions)
1193
+ oCache = this.getCacheAndMoveKeepAliveContexts(sResourcePath, mQueryOptions)
1192
1194
  || _AggregationCache.create(this.oModel.oRequestor, sResourcePath, sDeepResourcePath,
1193
1195
  this.mParameters.$$aggregation, mQueryOptions, this.oModel.bAutoExpandSelect,
1194
1196
  this.bSharedRequest);
1197
+ if (this.bSharedRequest) {
1198
+ oCache.registerChange("", this);
1199
+ }
1200
+
1201
+ return oCache;
1195
1202
  };
1196
1203
 
1197
1204
  /**
@@ -2674,6 +2681,35 @@ sap.ui.define([
2674
2681
  return this.bLengthFinal;
2675
2682
  };
2676
2683
 
2684
+ /**
2685
+ * Notification from the cache that the collection has changed. Currently, only bindings with
2686
+ * bSharedRequest register at the cache and are notified when the cache has been reset.
2687
+ *
2688
+ * @private
2689
+ */
2690
+ ODataListBinding.prototype.onChange = function () {
2691
+ var aDependentBindings,
2692
+ that = this;
2693
+
2694
+ if (!this.oRefreshPromise) {
2695
+ // some other binding with the same cache is refreshing
2696
+ if (this.isRootBindingSuspended()) {
2697
+ this.sResumeAction = "onChange";
2698
+ } else {
2699
+ // Note: after reset the dependent bindings cannot be found anymore
2700
+ aDependentBindings = this.getDependentBindings();
2701
+ this.reset(ChangeReason.Refresh);
2702
+ SyncPromise.all(
2703
+ aDependentBindings.map(function (oBinding) {
2704
+ return oBinding.refreshInternal("");
2705
+ })
2706
+ ).then(function () {
2707
+ return that.oHeaderContext.checkUpdateInternal();
2708
+ }).catch(this.oModel.getReporter());
2709
+ }
2710
+ }
2711
+ };
2712
+
2677
2713
  /**
2678
2714
  * @override
2679
2715
  * @see sap.ui.model.odata.v4.ODataBinding#refreshInternal
@@ -2701,8 +2737,12 @@ sap.ui.define([
2701
2737
 
2702
2738
  if (this.isRootBindingSuspended()) {
2703
2739
  // Note: side-effects (incl. refresh) are forbidden while suspended
2704
- this.refreshSuspended(sGroupId);
2705
- this.bRefreshKeptElements = true;
2740
+ if (this.bSharedRequest) {
2741
+ this.sResumeAction = "resetCache";
2742
+ } else {
2743
+ this.refreshSuspended(sGroupId);
2744
+ this.bRefreshKeptElements = true;
2745
+ }
2706
2746
  return SyncPromise.all(refreshAll(that.getDependentBindings()));
2707
2747
  }
2708
2748
 
@@ -2717,44 +2757,50 @@ sap.ui.define([
2717
2757
 
2718
2758
  if (oCache && !oPromise) { // do not refresh twice
2719
2759
  that.removeCachesAndMessages(sResourcePathPrefix);
2720
- that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
2721
- bKeepCacheOnError ? sGroupId : undefined);
2722
- oKeptElementsPromise = that.refreshKeptElements(sGroupId);
2723
- if (that.iCurrentEnd > 0) {
2724
- oPromise = that.createRefreshPromise().catch(function (oError) {
2725
- if (!bKeepCacheOnError || oError.canceled) {
2726
- throw oError;
2727
- }
2728
- return that.fetchResourcePath(that.oContext).then(function (sResourcePath) {
2729
- var i;
2730
-
2731
- if (!that.bRelative || oCache.getResourcePath() === sResourcePath) {
2732
- if (that.oCache === oCache) {
2733
- oCache.restore(true);
2734
- } else { // still needed in case of _AggregationCache
2735
- oCache.setActive(true);
2736
- that.oCache = oCache;
2737
- that.oCachePromise = SyncPromise.resolve(oCache);
2738
- }
2739
- that.iActiveContexts = iActiveContexts;
2740
- that.iCreatedContexts = iCreatedContexts;
2741
- for (i = 0; i < iCreatedContexts; i += 1) {
2742
- aContexts[i].iIndex = i - iCreatedContexts;
2743
- delete that.mPreviousContextsByPath[aContexts[i].getPath()];
2760
+ if (that.bSharedRequest) {
2761
+ oPromise = that.createRefreshPromise();
2762
+ oCache.reset([]);
2763
+ } else {
2764
+ that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
2765
+ bKeepCacheOnError ? sGroupId : undefined);
2766
+ oKeptElementsPromise = that.refreshKeptElements(sGroupId);
2767
+ if (that.iCurrentEnd > 0) {
2768
+ oPromise = that.createRefreshPromise().catch(function (oError) {
2769
+ if (!bKeepCacheOnError || oError.canceled) {
2770
+ throw oError;
2771
+ }
2772
+ return that.fetchResourcePath(that.oContext
2773
+ ).then(function (sResourcePath) {
2774
+ var i;
2775
+
2776
+ if (!that.bRelative || oCache.getResourcePath() === sResourcePath) {
2777
+ if (that.oCache === oCache) {
2778
+ oCache.restore(true);
2779
+ } else { // still needed in case of _AggregationCache
2780
+ oCache.setActive(true);
2781
+ that.oCache = oCache;
2782
+ that.oCachePromise = SyncPromise.resolve(oCache);
2783
+ }
2784
+ that.iActiveContexts = iActiveContexts;
2785
+ that.iCreatedContexts = iCreatedContexts;
2786
+ for (i = 0; i < iCreatedContexts; i += 1) {
2787
+ aContexts[i].iIndex = i - iCreatedContexts;
2788
+ delete that.mPreviousContextsByPath[aContexts[i].getPath()];
2789
+ }
2790
+ that.aContexts = aContexts; // restore created contexts
2791
+ that._fireChange({reason : ChangeReason.Change});
2744
2792
  }
2745
- that.aContexts = aContexts; // restore created contexts
2746
- that._fireChange({reason : ChangeReason.Change});
2793
+ throw oError;
2794
+ });
2795
+ }).finally(function () {
2796
+ if (oCache.restore) {
2797
+ oCache.restore(false);
2747
2798
  }
2748
- throw oError;
2749
2799
  });
2750
- }).finally(function () {
2751
- if (oCache.restore) {
2752
- oCache.restore(false);
2753
- }
2754
- });
2800
+ }
2755
2801
  }
2756
2802
  }
2757
- // Note: after reset the dependent bindings cannot be found any more
2803
+ // Note: after reset the dependent bindings cannot be found anymore
2758
2804
  aDependentBindings = that.getDependentBindings();
2759
2805
  that.reset(ChangeReason.Refresh, !oCache || (bKeepCacheOnError ? false : undefined),
2760
2806
  sGroupId); // this may reset that.oRefreshPromise
@@ -3293,14 +3339,24 @@ sap.ui.define([
3293
3339
  */
3294
3340
  ODataListBinding.prototype.resumeInternal = function (_bCheckUpdate, bParentHasChanges) {
3295
3341
  var aBindings = this.getDependentBindings(),
3342
+ sResumeAction = this.sResumeAction,
3296
3343
  sResumeChangeReason = this.sResumeChangeReason,
3297
- bRefresh = bParentHasChanges || sResumeChangeReason,
3344
+ bRefresh = bParentHasChanges || sResumeAction || sResumeChangeReason,
3298
3345
  that = this;
3299
3346
 
3347
+ this.sResumeAction = undefined;
3300
3348
  this.sResumeChangeReason = undefined;
3301
3349
 
3302
3350
  if (bRefresh) {
3303
3351
  this.removeCachesAndMessages("");
3352
+ if (sResumeAction === "onChange") {
3353
+ this.onChange();
3354
+ return;
3355
+ }
3356
+ if (sResumeAction === "resetCache") {
3357
+ this.oCache.reset([]);
3358
+ return;
3359
+ }
3304
3360
  this.reset();
3305
3361
  // if the parent binding resumes but there are no changes in the parent binding
3306
3362
  // ignore the parent cache and create an own cache
@@ -157,7 +157,7 @@ sap.ui.define([
157
157
  * @hideconstructor
158
158
  * @public
159
159
  * @since 1.37.0
160
- * @version 1.102.7
160
+ * @version 1.102.8
161
161
  */
162
162
  ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
163
163
  constructor : constructor
@@ -696,13 +696,16 @@ sap.ui.define([
696
696
  * Whether <code>&lt;edmx:Reference></code> and <code>&lt;edmx:Include></code> directives are
697
697
  * supported in order to load schemas on demand from other $metadata documents and include
698
698
  * them into the current service ("cross-service references").
699
+ * @param {string} [sLanguage]
700
+ * The "sap-language" URL parameter
699
701
  */
700
- function constructor(oRequestor, sUrl, vAnnotationUri, oModel, bSupportReferences) {
702
+ function constructor(oRequestor, sUrl, vAnnotationUri, oModel, bSupportReferences, sLanguage) {
701
703
  MetaModel.call(this);
702
704
  this.aAnnotationUris = vAnnotationUri && !Array.isArray(vAnnotationUri)
703
705
  ? [vAnnotationUri] : vAnnotationUri;
704
706
  this.sDefaultBindingMode = BindingMode.OneTime;
705
707
  this.mETags = {};
708
+ this.sLanguage = sLanguage;
706
709
  this.oLastModified = new Date(0);
707
710
  this.oMetadataPromise = null;
708
711
  this.oModel = oModel;
@@ -2345,6 +2348,7 @@ sap.ui.define([
2345
2348
  autoExpandSelect : bAutoExpandSelect,
2346
2349
  groupId : sGroupId,
2347
2350
  httpHeaders : this.oModel.getHttpHeaders(),
2351
+ metadataUrlParams : this.sLanguage && {"sap-language" : this.sLanguage},
2348
2352
  operationMode : OperationMode.Server,
2349
2353
  serviceUrl : sUrl,
2350
2354
  sharedRequests : true,
@@ -2555,24 +2559,20 @@ sap.ui.define([
2555
2559
 
2556
2560
  return this.requestObject("/@com.sap.vocabularies.CodeList.v1." + sTerm)
2557
2561
  .then(function (oCodeList) {
2558
- var sCacheKey,
2559
- oCodeListMetaModel,
2560
- oCodeListModel,
2561
- oPromise,
2562
- sTypePath;
2562
+ var sCacheKey, oCodeListMetaModel, oCodeListModel, oPromise, sTypePath, sUrl;
2563
2563
 
2564
2564
  if (!oCodeList) {
2565
2565
  return null;
2566
2566
  }
2567
2567
 
2568
- sCacheKey = that.getAbsoluteServiceUrl(oCodeList.Url)
2569
- + "#" + oCodeList.CollectionPath;
2568
+ sUrl = _Helper.setLanguage(oCodeList.Url, that.sLanguage);
2569
+ sCacheKey = that.getAbsoluteServiceUrl(sUrl) + "#" + oCodeList.CollectionPath;
2570
2570
  oPromise = mCodeListUrl2Promise.get(sCacheKey);
2571
2571
  if (oPromise) {
2572
2572
  return oPromise;
2573
2573
  }
2574
2574
 
2575
- oCodeListModel = that.getOrCreateSharedModel(oCodeList.Url, "$direct");
2575
+ oCodeListModel = that.getOrCreateSharedModel(sUrl, "$direct");
2576
2576
  oCodeListMetaModel = oCodeListModel.getMetaModel();
2577
2577
  sTypePath = "/" + oCodeList.CollectionPath + "/";
2578
2578
  oPromise = oCodeListMetaModel.requestObject(sTypePath).then(function (oType) {
@@ -214,7 +214,7 @@ sap.ui.define([
214
214
  * @extends sap.ui.model.Model
215
215
  * @public
216
216
  * @since 1.37.0
217
- * @version 1.102.7
217
+ * @version 1.102.8
218
218
  */
219
219
  ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
220
220
  /** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
@@ -243,6 +243,7 @@ sap.ui.define([
243
243
  sLanguageTag = sap.ui.getCore().getConfiguration().getLanguageTag(),
244
244
  sODataVersion,
245
245
  sParameter,
246
+ mQueryParams,
246
247
  sServiceUrl,
247
248
  oUri,
248
249
  mUriParameters,
@@ -319,15 +320,15 @@ sap.ui.define([
319
320
  }
320
321
  this.bSharedRequests = mParameters.sharedRequests === true;
321
322
 
323
+ // BEWARE: do not share mHeaders between _MetadataRequestor and _Requestor!
322
324
  this.mHeaders = {"Accept-Language" : sLanguageTag};
323
325
  this.mMetadataHeaders = {"Accept-Language" : sLanguageTag};
324
326
 
325
- // BEWARE: do not share mHeaders between _MetadataRequestor and _Requestor!
327
+ mQueryParams = Object.assign({}, mUriParameters, mParameters.metadataUrlParams);
326
328
  this.oMetaModel = new ODataMetaModel(
327
- _MetadataRequestor.create(this.mMetadataHeaders, sODataVersion,
328
- Object.assign({}, mUriParameters, mParameters.metadataUrlParams)),
329
+ _MetadataRequestor.create(this.mMetadataHeaders, sODataVersion, mQueryParams),
329
330
  this.sServiceUrl + "$metadata", mParameters.annotationURI, this,
330
- mParameters.supportReferences);
331
+ mParameters.supportReferences, mQueryParams["sap-language"]);
331
332
  this.oInterface = {
332
333
  fetchEntityContainer : this.oMetaModel.fetchEntityContainer.bind(this.oMetaModel),
333
334
  fetchMetadata : this.oMetaModel.fetchObject.bind(this.oMetaModel),
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @mixes sap.ui.model.odata.v4.ODataBinding
43
43
  * @public
44
44
  * @since 1.37.0
45
- * @version 1.102.7
45
+ * @version 1.102.8
46
46
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
47
47
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
48
48
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
@@ -470,7 +470,8 @@ sap.ui.define([
470
470
  };
471
471
 
472
472
  /**
473
- * Deregisters the given change listener. Note: shared caches have no listeners anyway.
473
+ * Deregisters the given change listener. Note: shared caches only have listeners for the empty
474
+ * path.
474
475
  *
475
476
  * @param {string} sPath
476
477
  * The path
@@ -480,7 +481,7 @@ sap.ui.define([
480
481
  * @public
481
482
  */
482
483
  _Cache.prototype.deregisterChange = function (sPath, oListener) {
483
- if (!this.bSharedRequest) {
484
+ if (!(this.bSharedRequest && sPath)) {
484
485
  _Helper.removeByPath(this.mChangeListeners, sPath, oListener);
485
486
  }
486
487
  };
@@ -1286,8 +1287,8 @@ sap.ui.define([
1286
1287
  };
1287
1288
 
1288
1289
  /**
1289
- * Registers the listener for the path. Shared caches do not register listeners because they are
1290
- * read-only.
1290
+ * Registers the listener for the path. Shared caches do not register listeners except for the
1291
+ * empty path, because they are read-only.
1291
1292
  *
1292
1293
  * @param {string} sPath The path
1293
1294
  * @param {object} [oListener] The listener
@@ -1295,7 +1296,7 @@ sap.ui.define([
1295
1296
  * @private
1296
1297
  */
1297
1298
  _Cache.prototype.registerChange = function (sPath, oListener) {
1298
- if (!this.bSharedRequest) {
1299
+ if (!(this.bSharedRequest && sPath)) {
1299
1300
  _Helper.addByPath(this.mChangeListeners, sPath, oListener);
1300
1301
  }
1301
1302
  };
@@ -1533,8 +1534,8 @@ sap.ui.define([
1533
1534
  this.iActiveUsages -= 1;
1534
1535
  if (!this.iActiveUsages) {
1535
1536
  this.iInactiveSince = Date.now();
1537
+ this.mChangeListeners = {};
1536
1538
  }
1537
- this.mChangeListeners = {}; // Note: shared caches have no listeners anyway
1538
1539
  }
1539
1540
  };
1540
1541
 
@@ -3043,6 +3044,10 @@ sap.ui.define([
3043
3044
  aKeptElementPredicates.forEach(function (sPredicate) {
3044
3045
  that.aElements.$byPredicate[sPredicate] = mByPredicate[sPredicate];
3045
3046
  });
3047
+ if (mChangeListeners[""]) {
3048
+ this.mChangeListeners[""] = mChangeListeners[""];
3049
+ _Helper.fireChange(this.mChangeListeners, "");
3050
+ }
3046
3051
  };
3047
3052
 
3048
3053
  /**
@@ -1818,6 +1818,23 @@ sap.ui.define([
1818
1818
  }
1819
1819
  },
1820
1820
 
1821
+ /**
1822
+ * Adds the given language as "sap-language" URL parameter to the given URL, unless such a
1823
+ * parameter is already present, and returns the resulting (or unchanged) URL.
1824
+ *
1825
+ * @param {string} sUrl - A URL w/o a fragment part
1826
+ * @param {string} [sLanguage] - An optional value for "sap-language"
1827
+ * @returns {string} The resulting (or unchanged) URL as described above
1828
+ */
1829
+ setLanguage : function (sUrl, sLanguage) {
1830
+ if (sLanguage && !sUrl.includes("?sap-language=") && !sUrl.includes("&sap-language=")) {
1831
+ sUrl += (sUrl.includes("?") ? "&" : "?") + "sap-language="
1832
+ + _Helper.encode(sLanguage);
1833
+ }
1834
+
1835
+ return sUrl;
1836
+ },
1837
+
1821
1838
  /**
1822
1839
  * Sets the new value of the private client-side instance annotation with the given
1823
1840
  * unqualified name at the given object.
@@ -228,7 +228,7 @@ sap.ui.define([
228
228
  *
229
229
  * @extends sap.ui.model.Model
230
230
  * @public
231
- * @version 1.102.7
231
+ * @version 1.102.8
232
232
  */
233
233
  var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
234
234
 
@@ -19,7 +19,7 @@ sap.ui.define(['sap/ui/model/SimpleType', 'sap/ui/model/FormatException', 'sap/u
19
19
  * @extends sap.ui.model.SimpleType
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.102.7
22
+ * @version 1.102.8
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions]
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.model.CompositeType
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.102.7
35
+ * @version 1.102.8
36
36
  *
37
37
  * @public
38
38
  * @param {object} [oFormatOptions]
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.model.SimpleType
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.102.7
29
+ * @version 1.102.8
30
30
  *
31
31
  * @public
32
32
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.model.CompositeType
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.102.7
36
+ * @version 1.102.8
37
37
  *
38
38
  * @public
39
39
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
19
19
  * @extends sap.ui.model.type.Date
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.102.7
22
+ * @version 1.102.8
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
19
19
  * @extends sap.ui.model.type.DateInterval
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.102.7
22
+ * @version 1.102.8
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.model.SimpleType
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.102.7
27
+ * @version 1.102.8
28
28
  *
29
29
  * @public
30
30
  * @param {object} [oFormatOptions] formatting options. Supports the same options as {@link sap.ui.core.format.FileSizeFormat.getInstance FileSizeFormat.getInstance}
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.model.SimpleType
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.102.7
29
+ * @version 1.102.8
30
30
  *
31
31
  * @public
32
32
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.NumberFormat NumberFormat}.
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.model.SimpleType
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.102.7
29
+ * @version 1.102.8
30
30
  *
31
31
  * @public
32
32
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.NumberFormat NumberFormat}.
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.model.SimpleType
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.102.7
27
+ * @version 1.102.8
28
28
  *
29
29
  * @alias sap.ui.model.type.String
30
30
  * @param {object} [oFormatOptions]
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
19
19
  * @extends sap.ui.model.type.Date
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.102.7
22
+ * @version 1.102.8
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
19
19
  * @extends sap.ui.model.type.DateInterval
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.102.7
22
+ * @version 1.102.8
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  *
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.102.7
50
+ * @version 1.102.8
51
51
  *
52
52
  * @public
53
53
  * @param {object} [oFormatOptions]
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @extends sap.ui.model.ClientModel
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.102.7
50
+ * @version 1.102.8
51
51
  *
52
52
  * @param {object} oData either the URL where to load the XML from or an XML
53
53
  * @public
@@ -53,7 +53,7 @@ sap.ui.define(['sap/ui/core/Core', "sap/ui/VersionInfo"],
53
53
  * @namespace
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.102.7
56
+ * @version 1.102.8
57
57
  *
58
58
  * @public
59
59
  * @since 1.48.0
@@ -27,7 +27,7 @@ sap.ui.define([ 'sap/ui/core/Element', 'sap/ui/core/Control', 'sap/ui/core/Core'
27
27
  * @namespace
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.102.7
30
+ * @version 1.102.8
31
31
  *
32
32
  * @public
33
33
  * @since 1.48.0
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.base.Object
25
25
  * @abstract
26
26
  * @author SAP SE
27
- * @version 1.102.7
27
+ * @version 1.102.8
28
28
  * @since 1.100
29
29
  */
30
30
  return BaseObject.extend("sap.ui.test.generic.TestBase", {
@@ -250,7 +250,7 @@ sap.ui.define(["sap/base/assert"], function (assert) {
250
250
  *
251
251
  * @enum {string}
252
252
  * @public
253
- * @version 1.102.7
253
+ * @version 1.102.8
254
254
  */
255
255
  Storage.Type = {
256
256
  /**