@openui5/sap.ui.core 1.96.21 → 1.96.23
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/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 +1 -1
- 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 +3 -3
- package/src/sap/ui/Global.js +4 -4
- 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 +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- 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 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- 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/Configuration.js +11 -14
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +4 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- 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 +1 -1
- 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/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 +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- 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 +1 -1
- 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/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 +1 -1
- package/src/sap/ui/core/support/Support.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 -1
- 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/theming/ThemeHelper.js +103 -0
- 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 +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- 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/ClientModel.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/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- 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/Type.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- 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 +1 -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/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +3 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +67 -39
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +4 -3
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +6 -5
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +10 -11
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +67 -32
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +5 -5
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +3 -4
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- 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 +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/util/Storage.js +1 -1
|
@@ -364,17 +364,17 @@ sap.ui.define([
|
|
|
364
364
|
};
|
|
365
365
|
|
|
366
366
|
/**
|
|
367
|
-
* Hook method for {@link #
|
|
368
|
-
* binding.
|
|
367
|
+
* Hook method for {@link #fetchOrGetQueryOptionsForOwnCache} to determine the query options for
|
|
368
|
+
* this binding.
|
|
369
369
|
*
|
|
370
370
|
* @param {sap.ui.model.Context} [oContext]
|
|
371
371
|
* The context instance to be used for a relative binding
|
|
372
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
373
|
-
*
|
|
372
|
+
* @returns {object|undefined|sap.ui.base.SyncPromise}
|
|
373
|
+
* The binding's query options (if any) or a promise resolving with them
|
|
374
374
|
*
|
|
375
375
|
* @abstract
|
|
376
376
|
* @function
|
|
377
|
-
* @name sap.ui.model.odata.v4.ODataBinding#
|
|
377
|
+
* @name sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
|
|
378
378
|
* @private
|
|
379
379
|
*/
|
|
380
380
|
|
|
@@ -430,7 +430,7 @@ sap.ui.define([
|
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
aPromises = [
|
|
433
|
-
this.
|
|
433
|
+
this.fetchOrGetQueryOptionsForOwnCache(oContext, bIgnoreParentCache),
|
|
434
434
|
this.oModel.oRequestor.ready()
|
|
435
435
|
];
|
|
436
436
|
this.mCacheQueryOptions = undefined;
|
|
@@ -476,60 +476,88 @@ sap.ui.define([
|
|
|
476
476
|
* @param {boolean} [bIgnoreParentCache]
|
|
477
477
|
* Whether the query options of the parent cache shall be ignored and own query options are
|
|
478
478
|
* determined (see {@link #fetchCache})
|
|
479
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
480
|
-
*
|
|
479
|
+
* @returns {object|sap.ui.base.SyncPromise}
|
|
480
|
+
* An object having two properties (or a promise resolving with it):
|
|
481
481
|
* {object} mQueryOptions - The query options to create the cache for this binding or
|
|
482
482
|
* <code>undefined</code> if no cache is to be created
|
|
483
483
|
* {string} sReducedPath - The binding's absolute, reduced path in the cache hierarchy
|
|
484
484
|
*
|
|
485
485
|
* @private
|
|
486
486
|
*/
|
|
487
|
-
ODataBinding.prototype.
|
|
487
|
+
ODataBinding.prototype.fetchOrGetQueryOptionsForOwnCache = function (oContext,
|
|
488
|
+
bIgnoreParentCache) {
|
|
488
489
|
var bHasNonSystemQueryOptions,
|
|
489
|
-
|
|
490
|
+
vQueryOptions, // {object|undefined|sap.ui.base.SyncPromise}
|
|
490
491
|
sResolvedPath = this.oModel.resolve(this.sPath, oContext),
|
|
491
492
|
that = this;
|
|
492
493
|
|
|
493
494
|
/*
|
|
494
|
-
* Wraps the given query options
|
|
495
|
-
*
|
|
495
|
+
* Wraps the given query options and adds sReducedPath to create a result for
|
|
496
|
+
* #fetchOrGetQueryOptionsForOwnCache.
|
|
496
497
|
*
|
|
497
|
-
* @param {object
|
|
498
|
-
*
|
|
498
|
+
* @param {object} [mQueryOptions]
|
|
499
|
+
* Map of query options, or <code>undefined</code>
|
|
500
|
+
* @param {boolean} [bDropEmptyObject]
|
|
501
|
+
* Whether an empty query options object should be replaced by <code>undefined</code>
|
|
499
502
|
* @param {string} [sReducedPath=sResolvedPath]
|
|
500
503
|
* The reduced path
|
|
501
|
-
* @returns {
|
|
502
|
-
* A
|
|
504
|
+
* @returns {object}
|
|
505
|
+
* A result for #fetchOrGetQueryOptionsForOwnCache
|
|
503
506
|
*/
|
|
504
|
-
function
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
507
|
+
function _wrapQueryOptions(mQueryOptions, bDropEmptyObject, sReducedPath) {
|
|
508
|
+
if (bDropEmptyObject && mQueryOptions && _Helper.isEmptyObject(mQueryOptions)) {
|
|
509
|
+
mQueryOptions = undefined;
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
mQueryOptions : mQueryOptions,
|
|
513
|
+
sReducedPath : sReducedPath || sResolvedPath
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/*
|
|
518
|
+
* Waits for <code>vQueryOptions</code> (if needed) and then creates a result for
|
|
519
|
+
* #fetchOrGetQueryOptionsForOwnCache.
|
|
520
|
+
*
|
|
521
|
+
* @param {boolean} [bDropEmptyObject]
|
|
522
|
+
* Whether an empty query options object should be replaced by <code>undefined</code>
|
|
523
|
+
* @param {string} [sReducedPath=sResolvedPath]
|
|
524
|
+
* The reduced path
|
|
525
|
+
* @returns {object|sap.ui.base.SyncPromise}
|
|
526
|
+
* A result for #fetchOrGetQueryOptionsForOwnCache
|
|
527
|
+
*/
|
|
528
|
+
function wrapQueryOptions(bDropEmptyObject, sReducedPath) {
|
|
529
|
+
if (vQueryOptions instanceof SyncPromise) {
|
|
530
|
+
if (!vQueryOptions.isFulfilled()) {
|
|
531
|
+
return vQueryOptions.then(function (mQueryOptions) {
|
|
532
|
+
return _wrapQueryOptions(mQueryOptions, bDropEmptyObject, sReducedPath);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
vQueryOptions = vQueryOptions.getResult();
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
return _wrapQueryOptions(vQueryOptions, bDropEmptyObject, sReducedPath);
|
|
511
539
|
}
|
|
512
540
|
|
|
513
541
|
if (this.oOperation // operation binding manages its cache on its own
|
|
514
542
|
|| this.bRelative && !oContext // unresolved binding
|
|
515
543
|
|| this.isMeta()) {
|
|
516
|
-
return
|
|
544
|
+
return _wrapQueryOptions();
|
|
517
545
|
}
|
|
518
546
|
|
|
519
547
|
// auto-$expand/$select and binding is a parent binding, so that it needs to wait until all
|
|
520
548
|
// its child bindings know via the corresponding promise in this.aChildCanUseCachePromises
|
|
521
549
|
// if they can use the parent binding's cache
|
|
522
550
|
// With $$aggregation, no auto-$expand/$select is needed
|
|
523
|
-
|
|
551
|
+
vQueryOptions = this.doFetchOrGetQueryOptions(oContext);
|
|
524
552
|
if (this.oModel.bAutoExpandSelect && this.aChildCanUseCachePromises
|
|
525
|
-
&& !
|
|
553
|
+
&& !this.mParameters.$$aggregation) {
|
|
526
554
|
// For auto-$expand/$select, wait for query options of dependent bindings:
|
|
527
555
|
// Promise.resolve() ensures all dependent bindings are created and have sent their
|
|
528
556
|
// query options promise to this binding via fetchIfChildCanUseCache.
|
|
529
557
|
// The aggregated query options of this binding and its dependent bindings are available
|
|
530
558
|
// in that.mAggregatedQueryOptions once all these promises are fulfilled.
|
|
531
|
-
|
|
532
|
-
|
|
559
|
+
vQueryOptions = SyncPromise.all([
|
|
560
|
+
vQueryOptions,
|
|
533
561
|
Promise.resolve().then(function () {
|
|
534
562
|
return SyncPromise.all(that.aChildCanUseCachePromises);
|
|
535
563
|
})
|
|
@@ -543,7 +571,7 @@ sap.ui.define([
|
|
|
543
571
|
// parent cache is ignored or (quasi-)absolute binding
|
|
544
572
|
if (bIgnoreParentCache || !this.bRelative || !oContext.fetchValue) {
|
|
545
573
|
// the binding shall create its own cache
|
|
546
|
-
return wrapQueryOptions(
|
|
574
|
+
return wrapQueryOptions();
|
|
547
575
|
}
|
|
548
576
|
|
|
549
577
|
// auto-$expand/$select: Use parent binding's cache if possible
|
|
@@ -553,27 +581,27 @@ sap.ui.define([
|
|
|
553
581
|
return sKey[0] !== "$" || sKey[1] === "$";
|
|
554
582
|
});
|
|
555
583
|
if (bHasNonSystemQueryOptions) {
|
|
556
|
-
return wrapQueryOptions(
|
|
584
|
+
return wrapQueryOptions();
|
|
557
585
|
}
|
|
558
586
|
return oContext.getBinding()
|
|
559
|
-
.fetchIfChildCanUseCache(oContext, that.sPath,
|
|
587
|
+
.fetchIfChildCanUseCache(oContext, that.sPath, vQueryOptions,
|
|
588
|
+
!this.mParameters) // duck typing for property binding
|
|
560
589
|
.then(function (sReducedPath) {
|
|
561
|
-
|
|
562
|
-
|
|
590
|
+
if (sReducedPath) {
|
|
591
|
+
vQueryOptions = undefined;
|
|
592
|
+
}
|
|
593
|
+
return wrapQueryOptions(false, sReducedPath);
|
|
563
594
|
});
|
|
564
595
|
}
|
|
565
596
|
|
|
566
597
|
// relative list or context binding with parameters which are not query options
|
|
567
598
|
// (such as $$groupId)
|
|
568
|
-
if (this.mParameters &&
|
|
569
|
-
return wrapQueryOptions(
|
|
599
|
+
if (this.mParameters && !_Helper.isEmptyObject(this.mParameters)) {
|
|
600
|
+
return wrapQueryOptions();
|
|
570
601
|
}
|
|
571
602
|
|
|
572
603
|
// relative binding which may have query options from UI5 filter or sorter objects
|
|
573
|
-
return
|
|
574
|
-
return wrapQueryOptions(
|
|
575
|
-
Object.keys(mQueryOptions).length ? mQueryOptions : undefined);
|
|
576
|
-
});
|
|
604
|
+
return wrapQueryOptions(true);
|
|
577
605
|
};
|
|
578
606
|
|
|
579
607
|
/**
|
|
@@ -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.
|
|
109
|
+
* @version 1.96.23
|
|
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
|
|
@@ -751,9 +751,9 @@ sap.ui.define([
|
|
|
751
751
|
|
|
752
752
|
/**
|
|
753
753
|
* @override
|
|
754
|
-
* @see sap.ui.model.odata.v4.ODataBinding#
|
|
754
|
+
* @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
|
|
755
755
|
*/
|
|
756
|
-
ODataContextBinding.prototype.
|
|
756
|
+
ODataContextBinding.prototype.doFetchOrGetQueryOptions = function (oContext) {
|
|
757
757
|
return this.fetchResolvedQueryOptions(oContext);
|
|
758
758
|
};
|
|
759
759
|
|
|
@@ -1417,6 +1417,7 @@ sap.ui.define([
|
|
|
1417
1417
|
if (bParentHasChanges || sResumeChangeReason) {
|
|
1418
1418
|
this.mAggregatedQueryOptions = {};
|
|
1419
1419
|
this.bAggregatedQueryOptionsInitial = true;
|
|
1420
|
+
this.mCanUseCachePromiseByChildPath = {};
|
|
1420
1421
|
this.removeCachesAndMessages("");
|
|
1421
1422
|
this.fetchCache(this.oContext);
|
|
1422
1423
|
}
|
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
77
77
|
* @public
|
|
78
78
|
* @since 1.37.0
|
|
79
|
-
* @version 1.96.
|
|
79
|
+
* @version 1.96.23
|
|
80
80
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
81
81
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
82
82
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -380,7 +380,7 @@ sap.ui.define([
|
|
|
380
380
|
sApply = _AggregationHelper.buildApply(mParameters.$$aggregation).$apply;
|
|
381
381
|
}
|
|
382
382
|
this.mQueryOptions = this.oModel.buildQueryOptions(mParameters, true);
|
|
383
|
-
this.oQueryOptionsPromise = undefined; // @see #
|
|
383
|
+
this.oQueryOptionsPromise = undefined; // @see #doFetchOrGetQueryOptions
|
|
384
384
|
this.mParameters = mParameters; // store mParameters at binding after validation
|
|
385
385
|
if (sApply) {
|
|
386
386
|
this.mQueryOptions.$apply = sApply;
|
|
@@ -1040,9 +1040,9 @@ sap.ui.define([
|
|
|
1040
1040
|
|
|
1041
1041
|
/**
|
|
1042
1042
|
* @override
|
|
1043
|
-
* @see sap.ui.model.odata.v4.ODataBinding#
|
|
1043
|
+
* @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
|
|
1044
1044
|
*/
|
|
1045
|
-
ODataListBinding.prototype.
|
|
1045
|
+
ODataListBinding.prototype.doFetchOrGetQueryOptions = function (oContext) {
|
|
1046
1046
|
// Note: an absolute binding needs no parent context :-)
|
|
1047
1047
|
var sMetaPath = oContext && _Helper.getMetaPath(oContext.getPath()),
|
|
1048
1048
|
that = this;
|
|
@@ -2212,7 +2212,7 @@ sap.ui.define([
|
|
|
2212
2212
|
ODataListBinding.prototype.inheritQueryOptions = function (mQueryOptions, oContext) {
|
|
2213
2213
|
var mInheritedQueryOptions;
|
|
2214
2214
|
|
|
2215
|
-
if (
|
|
2215
|
+
if (_Helper.isEmptyObject(this.mParameters)) {
|
|
2216
2216
|
// mix-in inherited static query options
|
|
2217
2217
|
mInheritedQueryOptions = this.getQueryOptionsForPath("", oContext);
|
|
2218
2218
|
if (mQueryOptions.$orderby && mInheritedQueryOptions.$orderby) {
|
|
@@ -3092,6 +3092,7 @@ sap.ui.define([
|
|
|
3092
3092
|
}
|
|
3093
3093
|
if (this.bHasPathReductionToParent && this.oModel.bAutoExpandSelect
|
|
3094
3094
|
&& !this.mParameters.$$aggregation) {
|
|
3095
|
+
this.mCanUseCachePromiseByChildPath = {};
|
|
3095
3096
|
this.sChangeReason = "AddVirtualContext"; // JIRA: CPOUI5ODATAV4-848
|
|
3096
3097
|
}
|
|
3097
3098
|
if (oContext.getBinding
|
|
@@ -11,7 +11,6 @@ sap.ui.define([
|
|
|
11
11
|
"./lib/_Helper",
|
|
12
12
|
"sap/base/assert",
|
|
13
13
|
"sap/base/Log",
|
|
14
|
-
"sap/base/util/isEmptyObject",
|
|
15
14
|
"sap/base/util/JSTokenizer",
|
|
16
15
|
"sap/base/util/ObjectPath",
|
|
17
16
|
"sap/ui/base/ManagedObject",
|
|
@@ -43,11 +42,11 @@ sap.ui.define([
|
|
|
43
42
|
"sap/ui/model/odata/type/String",
|
|
44
43
|
"sap/ui/model/odata/type/TimeOfDay",
|
|
45
44
|
"sap/ui/thirdparty/URI"
|
|
46
|
-
], function (AnnotationHelper, ValueListType, _Helper, assert, Log,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
], function (AnnotationHelper, ValueListType, _Helper, assert, Log, JSTokenizer, ObjectPath,
|
|
46
|
+
ManagedObject, SyncPromise, BindingMode, ChangeReason, ClientListBinding, BaseContext,
|
|
47
|
+
ContextBinding, MetaModel, PropertyBinding, OperationMode, Boolean, Byte, EdmDate,
|
|
48
|
+
DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, Raw, SByte, Single, Stream,
|
|
49
|
+
String, TimeOfDay, URI) {
|
|
51
50
|
"use strict";
|
|
52
51
|
/*global Map */
|
|
53
52
|
/*eslint max-nested-callbacks: 0 */
|
|
@@ -658,7 +657,7 @@ sap.ui.define([
|
|
|
658
657
|
* @hideconstructor
|
|
659
658
|
* @public
|
|
660
659
|
* @since 1.37.0
|
|
661
|
-
* @version 1.96.
|
|
660
|
+
* @version 1.96.23
|
|
662
661
|
*/
|
|
663
662
|
var ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
664
663
|
/*
|
|
@@ -1587,7 +1586,7 @@ sap.ui.define([
|
|
|
1587
1586
|
}
|
|
1588
1587
|
|
|
1589
1588
|
if (mFormatOptions) {
|
|
1590
|
-
if (isEmptyObject(mFormatOptions)) {
|
|
1589
|
+
if (_Helper.isEmptyObject(mFormatOptions)) {
|
|
1591
1590
|
mFormatOptions = undefined;
|
|
1592
1591
|
} else if ("parseKeepsEmptyString" in mFormatOptions
|
|
1593
1592
|
&& oProperty.$Type !== "Edm.String") {
|
|
@@ -3230,9 +3229,9 @@ sap.ui.define([
|
|
|
3230
3229
|
|
|
3231
3230
|
// Each reference must have contributed at least one qualifier. So if oValueListInfo
|
|
3232
3231
|
// is empty, there cannot have been a reference.
|
|
3233
|
-
if (isEmptyObject(oValueListInfo)) {
|
|
3234
|
-
throw new Error("No annotation '" + sValueListReferences.slice(1) + "' for "
|
|
3235
|
-
sPropertyPath);
|
|
3232
|
+
if (_Helper.isEmptyObject(oValueListInfo)) {
|
|
3233
|
+
throw new Error("No annotation '" + sValueListReferences.slice(1) + "' for "
|
|
3234
|
+
+ sPropertyPath);
|
|
3236
3235
|
}
|
|
3237
3236
|
|
|
3238
3237
|
return aRelevantQualifiers && oContext && oContext.getBinding
|
|
@@ -210,7 +210,7 @@ sap.ui.define([
|
|
|
210
210
|
* @extends sap.ui.model.Model
|
|
211
211
|
* @public
|
|
212
212
|
* @since 1.37.0
|
|
213
|
-
* @version 1.96.
|
|
213
|
+
* @version 1.96.23
|
|
214
214
|
*/
|
|
215
215
|
var ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
216
216
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */
|
|
@@ -32,6 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
this.mAggregatedQueryOptions = {};
|
|
33
33
|
// whether the aggregated query options are processed the first time
|
|
34
34
|
this.bAggregatedQueryOptionsInitial = true;
|
|
35
|
+
this.mCanUseCachePromiseByChildPath = {};
|
|
35
36
|
// auto-$expand/$select: promises to wait until child bindings have provided
|
|
36
37
|
// their path and query options
|
|
37
38
|
this.aChildCanUseCachePromises = [];
|
|
@@ -191,15 +192,16 @@ sap.ui.define([
|
|
|
191
192
|
* "5.1.2 System Query Option $expand" and "5.1.3 System Query Option $select" in specification
|
|
192
193
|
* "OData Version 4.0 Part 2: URL Conventions".
|
|
193
194
|
*
|
|
194
|
-
* @param {object} mQueryOptions The query options to be merged
|
|
195
|
-
* @param {string} sBaseMetaPath This binding's meta path
|
|
196
|
-
* @param {boolean} bCacheImmutable Whether the cache of this binding is immutable
|
|
195
|
+
* @param {object} mQueryOptions - The query options to be merged
|
|
196
|
+
* @param {string} sBaseMetaPath - This binding's meta path
|
|
197
|
+
* @param {boolean} bCacheImmutable - Whether the cache of this binding is immutable
|
|
198
|
+
* @param {boolean} [bIsProperty] - Whether the child is a property binding
|
|
197
199
|
* @returns {boolean} Whether the query options can be fulfilled by this binding
|
|
198
200
|
*
|
|
199
201
|
* @private
|
|
200
202
|
*/
|
|
201
203
|
ODataParentBinding.prototype.aggregateQueryOptions = function (mQueryOptions, sBaseMetaPath,
|
|
202
|
-
bCacheImmutable) {
|
|
204
|
+
bCacheImmutable, bIsProperty) {
|
|
203
205
|
var mAggregatedQueryOptionsClone = _Helper.merge({},
|
|
204
206
|
bCacheImmutable && this.mLateQueryOptions || this.mAggregatedQueryOptions),
|
|
205
207
|
bChanged = false,
|
|
@@ -208,14 +210,19 @@ sap.ui.define([
|
|
|
208
210
|
/*
|
|
209
211
|
* Recursively merges the given query options into the given aggregated query options.
|
|
210
212
|
*
|
|
211
|
-
* @param {object} mAggregatedQueryOptions
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* @param {
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
213
|
+
* @param {object} mAggregatedQueryOptions
|
|
214
|
+
* The aggregated query options
|
|
215
|
+
* @param {object} mQueryOptions0
|
|
216
|
+
* The query options to merge into the aggregated query options
|
|
217
|
+
* @param {string} [sMetaPath]
|
|
218
|
+
* The meta path for the current $expand (only used if cache is immutable)
|
|
219
|
+
* @param {boolean} [bInsideExpand]
|
|
220
|
+
* Whether the given query options are inside a $expand
|
|
221
|
+
* @param {boolean} [bAdd]
|
|
222
|
+
* Whether to add the given query options because they are in a $expand that has not been
|
|
223
|
+
* aggregated yet
|
|
224
|
+
* @returns {boolean}
|
|
225
|
+
* Whether the query options can be fulfilled by this binding
|
|
219
226
|
*/
|
|
220
227
|
function merge(mAggregatedQueryOptions, mQueryOptions0, sMetaPath, bInsideExpand, bAdd) {
|
|
221
228
|
/*
|
|
@@ -256,8 +263,9 @@ sap.ui.define([
|
|
|
256
263
|
|
|
257
264
|
// Top-level all query options in the aggregate are OK, even if not repeated in the
|
|
258
265
|
// child. In a $expand the child must also have them (and the second loop checks that
|
|
259
|
-
// they're equal).
|
|
260
|
-
return (
|
|
266
|
+
// they're equal). Property bindings are an exception to this rule.
|
|
267
|
+
return (bIsProperty || !bInsideExpand
|
|
268
|
+
|| Object.keys(mAggregatedQueryOptions).every(function (sName) {
|
|
261
269
|
return sName in mQueryOptions0 || sName === "$count" || sName === "$expand"
|
|
262
270
|
|| sName === "$select";
|
|
263
271
|
}))
|
|
@@ -288,6 +296,9 @@ sap.ui.define([
|
|
|
288
296
|
if (merge(mAggregatedQueryOptionsClone, mQueryOptions, sBaseMetaPath)) {
|
|
289
297
|
if (!bCacheImmutable) {
|
|
290
298
|
this.mAggregatedQueryOptions = mAggregatedQueryOptionsClone;
|
|
299
|
+
if (this.mLateQueryOptions) {
|
|
300
|
+
merge(this.mLateQueryOptions, mQueryOptions);
|
|
301
|
+
}
|
|
291
302
|
} else if (bChanged) {
|
|
292
303
|
this.mLateQueryOptions = mAggregatedQueryOptionsClone;
|
|
293
304
|
}
|
|
@@ -634,13 +645,15 @@ sap.ui.define([
|
|
|
634
645
|
* @param {sap.ui.model.odata.v4.Context} oContext
|
|
635
646
|
* A context of this binding which is the direct or indirect parent of the child binding.
|
|
636
647
|
* Initially it is the child binding's parent context (See
|
|
637
|
-
* {@link sap.ui.model.odata.v4.ODataBinding#
|
|
638
|
-
* delegates up to its parent binding, it passes its own parent context adjusting
|
|
648
|
+
* {@link sap.ui.model.odata.v4.ODataBinding#fetchOrGetQueryOptionsForOwnCache}). When a
|
|
649
|
+
* binding delegates up to its parent binding, it passes its own parent context adjusting
|
|
639
650
|
* <code>sChildPath</code> accordingly.
|
|
640
651
|
* @param {string} sChildPath
|
|
641
652
|
* The child binding's binding path relative to <code>oContext</code>
|
|
642
|
-
* @param {object|sap.ui.base.SyncPromise} vChildQueryOptions
|
|
643
|
-
* The child binding's (aggregated) query options or a promise resolving with them
|
|
653
|
+
* @param {object|sap.ui.base.SyncPromise} [vChildQueryOptions={}]
|
|
654
|
+
* The child binding's (aggregated) query options (if any) or a promise resolving with them
|
|
655
|
+
* @param {boolean} [bIsProperty]
|
|
656
|
+
* Whether the child is a property binding
|
|
644
657
|
* @returns {sap.ui.base.SyncPromise}
|
|
645
658
|
* A promise resolved with the reduced path for the child binding if the child binding can use
|
|
646
659
|
* this binding's or an ancestor binding's cache; <code>undefined</code> otherwise.
|
|
@@ -649,11 +662,11 @@ sap.ui.define([
|
|
|
649
662
|
* @see sap.ui.model.odata.v4.ODataMetaModel#getReducedPath
|
|
650
663
|
*/
|
|
651
664
|
ODataParentBinding.prototype.fetchIfChildCanUseCache = function (oContext, sChildPath,
|
|
652
|
-
vChildQueryOptions) {
|
|
665
|
+
vChildQueryOptions, bIsProperty) {
|
|
653
666
|
// getBaseForPathReduction must be called early, because the (virtual) parent context may be
|
|
654
667
|
// lost again when the path is needed
|
|
655
668
|
var sBaseForPathReduction = this.getBaseForPathReduction(),
|
|
656
|
-
sBaseMetaPath
|
|
669
|
+
sBaseMetaPath,
|
|
657
670
|
bCacheImmutable,
|
|
658
671
|
oCanUseCachePromise,
|
|
659
672
|
// whether this binding is an operation or depends on one
|
|
@@ -708,6 +721,23 @@ sap.ui.define([
|
|
|
708
721
|
return SyncPromise.resolve(sResolvedChildPath);
|
|
709
722
|
}
|
|
710
723
|
|
|
724
|
+
oCanUseCachePromise = this.mCanUseCachePromiseByChildPath[sChildPath];
|
|
725
|
+
if (oCanUseCachePromise && bIsProperty) {
|
|
726
|
+
return oCanUseCachePromise.then(function (sOldReducedPath) {
|
|
727
|
+
if (!sOldReducedPath) {
|
|
728
|
+
return undefined;
|
|
729
|
+
}
|
|
730
|
+
// Note: sResolvedChildPath could be "/SalesOrderList('42')/SO_2_SOITEM/0/Note"
|
|
731
|
+
// w/ index (thus getMetaPath helps), but getStrippedMetaPath makes no difference
|
|
732
|
+
if (!sChildPath.includes("/")
|
|
733
|
+
|| _Helper.getMetaPath(sOldReducedPath)
|
|
734
|
+
=== _Helper.getMetaPath(sResolvedChildPath)) {
|
|
735
|
+
return sResolvedChildPath;
|
|
736
|
+
}
|
|
737
|
+
return oMetaModel.getReducedPath(sResolvedChildPath, sBaseForPathReduction);
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
|
|
711
741
|
// Note: this.oCachePromise exists for all bindings except operation bindings; it might
|
|
712
742
|
// become pending again
|
|
713
743
|
bCacheImmutable = this.oCachePromise.isRejected()
|
|
@@ -715,16 +745,17 @@ sap.ui.define([
|
|
|
715
745
|
|| oContext.isKeepAlive() // kept-alive contexts have no index when not in aContexts
|
|
716
746
|
|| this.oCache === null
|
|
717
747
|
|| this.oCache && this.oCache.hasSentRequest();
|
|
748
|
+
sBaseMetaPath = _Helper.getMetaPath(oContext.getPath());
|
|
718
749
|
aPromises = [
|
|
719
|
-
this.
|
|
750
|
+
this.doFetchOrGetQueryOptions(this.oContext),
|
|
720
751
|
// After access to complete meta path of property, the metadata of all prefix paths
|
|
721
752
|
// is loaded so that synchronous access in wrapChildQueryOptions via getObject is
|
|
722
|
-
// possible
|
|
753
|
+
// possible - as well as #getReducedPath
|
|
723
754
|
fetchPropertyAndType(),
|
|
724
755
|
vChildQueryOptions
|
|
725
756
|
];
|
|
726
757
|
oCanUseCachePromise = SyncPromise.all(aPromises).then(function (aResult) {
|
|
727
|
-
var mChildQueryOptions = aResult[2],
|
|
758
|
+
var mChildQueryOptions = aResult[2] || {},
|
|
728
759
|
mWrappedChildQueryOptions,
|
|
729
760
|
mLocalQueryOptions = aResult[0],
|
|
730
761
|
oProperty = aResult[1],
|
|
@@ -745,7 +776,7 @@ sap.ui.define([
|
|
|
745
776
|
that.bHasPathReductionToParent = true;
|
|
746
777
|
return that.oContext.getBinding().fetchIfChildCanUseCache(that.oContext,
|
|
747
778
|
_Helper.getRelativePath(sResolvedChildPath, that.oContext.getPath()),
|
|
748
|
-
|
|
779
|
+
mChildQueryOptions, bIsProperty);
|
|
749
780
|
}
|
|
750
781
|
|
|
751
782
|
if (bDependsOnOperation || sReducedChildMetaPath === "$count"
|
|
@@ -761,7 +792,7 @@ sap.ui.define([
|
|
|
761
792
|
if (bIsAdvertisement) {
|
|
762
793
|
mWrappedChildQueryOptions = {"$select" : [sReducedChildMetaPath.slice(1)]};
|
|
763
794
|
return that.aggregateQueryOptions(mWrappedChildQueryOptions, sBaseMetaPath,
|
|
764
|
-
bCacheImmutable)
|
|
795
|
+
bCacheImmutable, bIsProperty)
|
|
765
796
|
? sReducedPath
|
|
766
797
|
: undefined;
|
|
767
798
|
}
|
|
@@ -773,7 +804,7 @@ sap.ui.define([
|
|
|
773
804
|
that.oModel.oInterface.fetchMetadata);
|
|
774
805
|
if (mWrappedChildQueryOptions) {
|
|
775
806
|
return that.aggregateQueryOptions(mWrappedChildQueryOptions, sBaseMetaPath,
|
|
776
|
-
bCacheImmutable)
|
|
807
|
+
bCacheImmutable, bIsProperty)
|
|
777
808
|
? sReducedPath
|
|
778
809
|
: undefined;
|
|
779
810
|
}
|
|
@@ -781,7 +812,7 @@ sap.ui.define([
|
|
|
781
812
|
}
|
|
782
813
|
if (sReducedChildMetaPath === "value") { // symbolic name for operation result
|
|
783
814
|
return that.aggregateQueryOptions(mChildQueryOptions, sBaseMetaPath,
|
|
784
|
-
bCacheImmutable)
|
|
815
|
+
bCacheImmutable, bIsProperty)
|
|
785
816
|
? sReducedPath
|
|
786
817
|
: undefined;
|
|
787
818
|
}
|
|
@@ -794,8 +825,8 @@ sap.ui.define([
|
|
|
794
825
|
if (that.oCache) {
|
|
795
826
|
that.oCache.setLateQueryOptions(that.mLateQueryOptions);
|
|
796
827
|
} else if (that.oCache === null) {
|
|
797
|
-
return that.oContext.getBinding()
|
|
798
|
-
that.sPath,
|
|
828
|
+
return that.oContext.getBinding()
|
|
829
|
+
.fetchIfChildCanUseCache(that.oContext, that.sPath, that.mLateQueryOptions)
|
|
799
830
|
.then(function (sPath) {
|
|
800
831
|
return sPath && sReducedPath;
|
|
801
832
|
});
|
|
@@ -803,6 +834,9 @@ sap.ui.define([
|
|
|
803
834
|
}
|
|
804
835
|
return sReducedPath;
|
|
805
836
|
});
|
|
837
|
+
if (bIsProperty && !oContext.getPath().includes("($uid=")) {
|
|
838
|
+
this.mCanUseCachePromiseByChildPath[sChildPath] = oCanUseCachePromise;
|
|
839
|
+
}
|
|
806
840
|
this.aChildCanUseCachePromises.push(oCanUseCachePromise);
|
|
807
841
|
this.oCachePromise = SyncPromise.all([this.oCachePromise, oCanUseCachePromise])
|
|
808
842
|
.then(function (aResult) {
|
|
@@ -827,6 +861,7 @@ sap.ui.define([
|
|
|
827
861
|
that.oModel.reportError(that + ": Failed to enhance query options for "
|
|
828
862
|
+ "auto-$expand/$select for child " + sChildPath, sClassName, oError);
|
|
829
863
|
});
|
|
864
|
+
|
|
830
865
|
return oCanUseCachePromise;
|
|
831
866
|
};
|
|
832
867
|
|
|
@@ -947,7 +982,7 @@ sap.ui.define([
|
|
|
947
982
|
* @private
|
|
948
983
|
*/
|
|
949
984
|
ODataParentBinding.prototype.getQueryOptionsForPath = function (sPath, oContext) {
|
|
950
|
-
if (
|
|
985
|
+
if (!_Helper.isEmptyObject(this.mParameters)) {
|
|
951
986
|
// binding has parameters -> all query options need to be defined at the binding
|
|
952
987
|
return _Helper.getQueryOptionsForPath(this.getQueryOptionsFromParameters(), sPath);
|
|
953
988
|
}
|
|
@@ -976,8 +1011,8 @@ sap.ui.define([
|
|
|
976
1011
|
* @function
|
|
977
1012
|
* @name sap.ui.model.odata.v4.ODataParentBinding.getQueryOptionsFromParameters
|
|
978
1013
|
* @private
|
|
979
|
-
* @see sap.ui.model.odata.v4.ODataBinding#
|
|
980
|
-
* @see sap.ui.model.odata.v4.ODataBinding#
|
|
1014
|
+
* @see sap.ui.model.odata.v4.ODataBinding#fetchOrGetQueryOptionsForOwnCache
|
|
1015
|
+
* @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
|
|
981
1016
|
*/
|
|
982
1017
|
|
|
983
1018
|
/**
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @mixes sap.ui.model.odata.v4.ODataBinding
|
|
58
58
|
* @public
|
|
59
59
|
* @since 1.37.0
|
|
60
|
-
* @version 1.96.
|
|
60
|
+
* @version 1.96.23
|
|
61
61
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
62
62
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
63
63
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -97,7 +97,7 @@ sap.ui.define([
|
|
|
97
97
|
this.mQueryOptions = this.oModel.buildQueryOptions(_Helper.clone(mParameters),
|
|
98
98
|
/*bSystemQueryOptionsAllowed*/sPath.endsWith("$count"));
|
|
99
99
|
this.vValue = undefined;
|
|
100
|
-
// BEWARE: #
|
|
100
|
+
// BEWARE: #doFetchOrGetQueryOptions uses #isRoot which relies on this.oContext!
|
|
101
101
|
this.fetchCache(oContext);
|
|
102
102
|
oModel.bindingCreated(this);
|
|
103
103
|
},
|
|
@@ -394,10 +394,10 @@ sap.ui.define([
|
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* @override
|
|
397
|
-
* @see sap.ui.model.odata.v4.ODataBinding#
|
|
397
|
+
* @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
|
|
398
398
|
*/
|
|
399
|
-
ODataPropertyBinding.prototype.
|
|
400
|
-
return this.isRoot() ?
|
|
399
|
+
ODataPropertyBinding.prototype.doFetchOrGetQueryOptions = function () {
|
|
400
|
+
return this.isRoot() ? this.mQueryOptions : undefined;
|
|
401
401
|
};
|
|
402
402
|
|
|
403
403
|
/**
|
|
@@ -10,10 +10,9 @@ sap.ui.define([
|
|
|
10
10
|
"./_Helper",
|
|
11
11
|
"./_Requestor",
|
|
12
12
|
"sap/base/Log",
|
|
13
|
-
"sap/base/util/isEmptyObject",
|
|
14
13
|
"sap/ui/base/SyncPromise",
|
|
15
14
|
"sap/ui/model/odata/ODataUtils"
|
|
16
|
-
], function (_GroupLock, _Helper, _Requestor, Log,
|
|
15
|
+
], function (_GroupLock, _Helper, _Requestor, Log, SyncPromise, ODataUtils) {
|
|
17
16
|
"use strict";
|
|
18
17
|
|
|
19
18
|
var sClassName = "sap.ui.model.odata.v4.lib._Cache",
|
|
@@ -982,7 +981,7 @@ sap.ui.define([
|
|
|
982
981
|
* @see #registerChange
|
|
983
982
|
*/
|
|
984
983
|
_Cache.prototype.hasChangeListeners = function () {
|
|
985
|
-
return !isEmptyObject(this.mChangeListeners);
|
|
984
|
+
return !_Helper.isEmptyObject(this.mChangeListeners);
|
|
986
985
|
};
|
|
987
986
|
|
|
988
987
|
/**
|
|
@@ -3029,7 +3028,7 @@ sap.ui.define([
|
|
|
3029
3028
|
if (oData) {
|
|
3030
3029
|
sHttpMethod = oData["X-HTTP-Method"] || sHttpMethod;
|
|
3031
3030
|
delete oData["X-HTTP-Method"];
|
|
3032
|
-
if (this.oRequestor.isActionBodyOptional() &&
|
|
3031
|
+
if (this.oRequestor.isActionBodyOptional() && _Helper.isEmptyObject(oData)) {
|
|
3033
3032
|
oData = undefined;
|
|
3034
3033
|
}
|
|
3035
3034
|
}
|
|
@@ -1553,6 +1553,10 @@ sap.ui.define([
|
|
|
1553
1553
|
return _Helper.getRelativePath(sPath, sBasePath) !== undefined;
|
|
1554
1554
|
},
|
|
1555
1555
|
|
|
1556
|
+
// Trampoline property to allow for mocking function module in unit tests.
|
|
1557
|
+
// @see sap.base.util.isEmptyObject
|
|
1558
|
+
isEmptyObject : isEmptyObject,
|
|
1559
|
+
|
|
1556
1560
|
/**
|
|
1557
1561
|
* Tells whether the value is a safe integer.
|
|
1558
1562
|
*
|
|
@@ -2164,7 +2168,7 @@ sap.ui.define([
|
|
|
2164
2168
|
}
|
|
2165
2169
|
}
|
|
2166
2170
|
if (oProperty.$kind === "Property") {
|
|
2167
|
-
if (
|
|
2171
|
+
if (!isEmptyObject(mChildQueryOptions)) {
|
|
2168
2172
|
Log.error("Failed to enhance query options for auto-$expand/$select as the"
|
|
2169
2173
|
+ " child binding has query options, but its path '" + sChildMetaPath
|
|
2170
2174
|
+ "' points to a structural property",
|
|
@@ -476,7 +476,7 @@ sap.ui.define([
|
|
|
476
476
|
_Requestor.prototype.checkForOpenRequests = function () {
|
|
477
477
|
var that = this;
|
|
478
478
|
|
|
479
|
-
if (
|
|
479
|
+
if (!_Helper.isEmptyObject(this.mRunningChangeRequests) // running change requests
|
|
480
480
|
|| Object.keys(this.mBatchQueue).some(function (sGroupId) { // pending requests
|
|
481
481
|
return that.mBatchQueue[sGroupId].some(function (vRequest) {
|
|
482
482
|
return Array.isArray(vRequest) ? vRequest.length : true;
|