@openui5/sap.ui.core 1.107.1 → 1.108.1
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/.dtsgenrc +63 -0
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/i18n/ResourceBundle.js +10 -0
- package/src/sap/base/security/URLListValidator.js +36 -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 +2 -2
- 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 +50 -50
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +22 -8
- package/src/sap/ui/core/Component.js +21 -4
- package/src/sap/ui/core/ComponentContainer.js +5 -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 +2 -15
- package/src/sap/ui/core/Control.js +20 -2
- package/src/sap/ui/core/Core.js +311 -413
- 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/FocusHandler.js +12 -14
- package/src/sap/ui/core/Fragment.js +5 -2
- 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/IconPool.js +7 -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 +16 -83
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +14 -4
- package/src/sap/ui/core/RenderManager.js +111 -109
- 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/ShortcutHintsMixin.js +20 -0
- 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 +4 -2
- 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/_IconRegistry.js +11 -7
- package/src/sap/ui/core/_UrlResolver.js +139 -0
- package/src/sap/ui/core/date/CalendarUtils.js +87 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +73 -0
- package/src/sap/ui/core/date/UniversalDate.js +198 -74
- 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/format/DateFormat.js +187 -57
- package/src/sap/ui/core/format/NumberFormat.js +64 -23
- package/src/sap/ui/core/format/TimezoneUtil.js +3 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +19 -10
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +5 -3
- 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/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +10 -2
- 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 +21 -20
- 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/themes/base/LocalBusyIndicator.less +3 -3
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +31 -12
- package/src/sap/ui/core/theming/ThemeHelper.js +56 -1
- package/src/sap/ui/core/theming/ThemeManager.js +817 -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 +2 -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/dom/getFirstEditableInput.js +25 -6
- package/src/sap/ui/dom/includeStylesheet.js +2 -2
- package/src/sap/ui/model/ClientListBinding.js +11 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +60 -5
- 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/Filter.js +6 -6
- 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/Sorter.js +6 -4
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBinding.js +18 -0
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +28 -34
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +590 -0
- 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/DateTimeWithTimezone.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/BatchMode.js +2 -2
- package/src/sap/ui/model/odata/v2/Context.js +169 -4
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +39 -17
- package/src/sap/ui/model/odata/v2/ODataModel.js +219 -82
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +35 -22
- package/src/sap/ui/model/odata/v4/ODataBinding.js +28 -22
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +6 -6
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +111 -89
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +5 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +84 -46
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +19 -20
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +12 -5
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +130 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +56 -15
- 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/test/TestUtils.js +20 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/thirdparty/mobify-carousel.js +0 -4
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +0 -389
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
58
58
|
* @public
|
|
59
59
|
* @since 1.37.0
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.108.1
|
|
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
|
|
@@ -261,7 +261,7 @@ sap.ui.define([
|
|
|
261
261
|
* A lock for the group ID to be used for the DELETE request; w/o a lock, no DELETE is sent.
|
|
262
262
|
* For a transient entity, the lock is ignored (use NULL)!
|
|
263
263
|
* @param {string} sEditUrl
|
|
264
|
-
* The entity's edit URL to be used for the DELETE request;
|
|
264
|
+
* The entity's edit URL to be used for the DELETE request; w/o a lock, this is mostly
|
|
265
265
|
* ignored.
|
|
266
266
|
* @param {sap.ui.model.odata.v4.Context} oContext
|
|
267
267
|
* The context to be deleted
|
|
@@ -291,22 +291,16 @@ sap.ui.define([
|
|
|
291
291
|
// context is not in aContexts -> use the predicate
|
|
292
292
|
? _Helper.getRelativePath(oContext.getPath(), this.oHeaderContext.getPath())
|
|
293
293
|
: String(oContext.iIndex),
|
|
294
|
-
|
|
294
|
+
bReset = false,
|
|
295
295
|
that = this;
|
|
296
296
|
|
|
297
|
-
if (oGroupLock && oContext.iIndex === undefined
|
|
298
|
-
&& this.oModel.isApiGroup(oGroupLock.getGroupId())) {
|
|
299
|
-
throw new Error("Cannot delete a kept-alive context in an API group when it is not in"
|
|
300
|
-
+ " the collection");
|
|
301
|
-
}
|
|
302
|
-
|
|
303
297
|
this.iDeletedContexts += 1;
|
|
304
298
|
|
|
305
|
-
return this.deleteFromCache(oGroupLock, sEditUrl, sPath, oETagEntity,
|
|
299
|
+
return this.deleteFromCache(oGroupLock, sEditUrl, sPath, oETagEntity,
|
|
306
300
|
function (iIndex, iOffset) {
|
|
307
301
|
if (iIndex !== undefined) {
|
|
308
302
|
// An entity can only be deleted when its key predicate is known. So we can be
|
|
309
|
-
// sure to have key predicates and the contexts
|
|
303
|
+
// sure to have key predicates and the contexts are related to entities and not
|
|
310
304
|
// rows. -> Shift them and adjust the indexes
|
|
311
305
|
if (iOffset > 0) { // we're re-inserting
|
|
312
306
|
delete that.mPreviousContextsByPath[oContext.getPath()];
|
|
@@ -330,37 +324,45 @@ sap.ui.define([
|
|
|
330
324
|
that.aContexts.forEach(function (oContext0, i) {
|
|
331
325
|
oContext0.iIndex = i - that.iCreatedContexts;
|
|
332
326
|
});
|
|
333
|
-
} else if (
|
|
334
|
-
|
|
335
|
-
|
|
327
|
+
} else if (iOffset > 0) { // trying to reinsert an element w/o index
|
|
328
|
+
bReset = true;
|
|
329
|
+
} else if (that.bLengthFinal && !bDoNotRequestCount) {
|
|
330
|
+
// a kept-alive context is not in aContexts -> request the count
|
|
331
|
+
that.oCache.requestCount(
|
|
332
|
+
oGroupLock && !that.oModel.isApiGroup(oGroupLock.getGroupId())
|
|
333
|
+
? oGroupLock.getUnlockedCopy()
|
|
334
|
+
: that.lockGroup("$auto")
|
|
335
|
+
).then(function (iCount) {
|
|
336
|
+
var iOldMaxLength = that.iMaxLength;
|
|
337
|
+
|
|
338
|
+
that.iMaxLength = iCount - that.iActiveContexts;
|
|
339
|
+
// Note: Although we know that oContext is not in aContexts, a "change"
|
|
340
|
+
// event needs to be fired in order to notify the control about the new
|
|
341
|
+
// length, for example, to update the 'More' button or the scrollbar.
|
|
342
|
+
if (iOldMaxLength !== that.iMaxLength) {
|
|
343
|
+
that._fireChange({reason : ChangeReason.Remove});
|
|
344
|
+
}
|
|
345
|
+
});
|
|
336
346
|
}
|
|
337
347
|
}
|
|
338
348
|
).then(function () {
|
|
339
|
-
var iOldMaxLength = that.iMaxLength;
|
|
340
|
-
|
|
341
349
|
that.iDeletedContexts -= 1;
|
|
342
350
|
if (!that.iDeletedContexts && !that.iCreatedContexts) {
|
|
343
351
|
// all (created) contexts finally gone -> free to create at any end
|
|
344
352
|
that.bFirstCreateAtEnd = undefined;
|
|
345
353
|
}
|
|
346
354
|
oContext.resetKeepAlive();
|
|
347
|
-
if (bReadCount) {
|
|
348
|
-
that.iMaxLength = that.fetchValue("$count", undefined, true).getResult()
|
|
349
|
-
- that.iActiveContexts;
|
|
350
|
-
|
|
351
|
-
// Note: Although we know that oContext is not in aContexts, a "change" event needs
|
|
352
|
-
// to be fired in order to notify the control about the new length, for example, to
|
|
353
|
-
// update the 'More' button or the scrollbar.
|
|
354
|
-
if (iOldMaxLength !== that.iMaxLength) {
|
|
355
|
-
that._fireChange({reason : ChangeReason.Remove});
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
355
|
oContext.iIndex = Context.VIRTUAL; // prevent further cache access via this context
|
|
359
356
|
that.oModel.addPrerenderingTask(
|
|
360
357
|
that.destroyPreviousContexts.bind(that, [oContext.getPath()]));
|
|
361
358
|
}, function (oError) {
|
|
362
359
|
that.iDeletedContexts -= 1;
|
|
363
|
-
|
|
360
|
+
if (bReset) {
|
|
361
|
+
that.oCache.reset(that.getKeepAlivePredicates());
|
|
362
|
+
that.reset(ChangeReason.Change);
|
|
363
|
+
} else {
|
|
364
|
+
that._fireChange({reason : ChangeReason.Add});
|
|
365
|
+
}
|
|
364
366
|
throw oError;
|
|
365
367
|
});
|
|
366
368
|
};
|
|
@@ -1152,22 +1154,14 @@ sap.ui.define([
|
|
|
1152
1154
|
*/
|
|
1153
1155
|
ODataListBinding.prototype.doCreateCache = function (sResourcePath, mQueryOptions, oContext,
|
|
1154
1156
|
sDeepResourcePath, sGroupId, oOldCache) {
|
|
1155
|
-
var
|
|
1156
|
-
|
|
1157
|
-
aKeptElementPaths,
|
|
1158
|
-
that = this;
|
|
1157
|
+
var oCache,
|
|
1158
|
+
aKeepAlivePredicates;
|
|
1159
1159
|
|
|
1160
1160
|
if (oOldCache && oOldCache.getResourcePath() === sResourcePath
|
|
1161
1161
|
&& oOldCache.$deepResourcePath === sDeepResourcePath) {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
});
|
|
1166
|
-
|
|
1167
|
-
if (this.iCreatedContexts || aKeptElementPaths.length) {
|
|
1168
|
-
oOldCache.reset(aKeptElementPaths.map(function (sPath) {
|
|
1169
|
-
return _Helper.getRelativePath(sPath, sBindingPath);
|
|
1170
|
-
}), sGroupId);
|
|
1162
|
+
aKeepAlivePredicates = this.getKeepAlivePredicates();
|
|
1163
|
+
if (this.iCreatedContexts || this.iDeletedContexts || aKeepAlivePredicates.length) {
|
|
1164
|
+
oOldCache.reset(aKeepAlivePredicates, sGroupId);
|
|
1171
1165
|
// Note: #inheritQueryOptions as called below should not matter in case of own
|
|
1172
1166
|
// requests, which are a precondition for kept-alive elements
|
|
1173
1167
|
oOldCache.setQueryOptions(mQueryOptions, true);
|
|
@@ -1758,13 +1752,17 @@ sap.ui.define([
|
|
|
1758
1752
|
* @returns {this}
|
|
1759
1753
|
* <code>this</code> to facilitate method chaining
|
|
1760
1754
|
* @throws {Error}
|
|
1761
|
-
* If there are pending changes that cannot be ignored or
|
|
1762
|
-
* used (see {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1755
|
+
* If there are pending changes that cannot be ignored or an unsupported operation mode is
|
|
1756
|
+
* used (see {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
1757
|
+
* <br>
|
|
1758
|
+
* The following pending changes are ignored:
|
|
1759
|
+
* <ul>
|
|
1760
|
+
* <li> changes relating to a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive}
|
|
1761
|
+
* context of this binding (since 1.97.0),
|
|
1762
|
+
* <li> {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts of a
|
|
1763
|
+
* {@link #getRootBinding root binding} (since 1.98.0),
|
|
1764
|
+
* <li> {@link sap.ui.model.odata.v4.Context#delete deleted} contexts (since 1.108.0).
|
|
1765
|
+
* </ul>
|
|
1768
1766
|
*
|
|
1769
1767
|
* @public
|
|
1770
1768
|
* @see sap.ui.model.ListBinding#filter
|
|
@@ -1785,10 +1783,6 @@ sap.ui.define([
|
|
|
1785
1783
|
return this;
|
|
1786
1784
|
}
|
|
1787
1785
|
|
|
1788
|
-
if (this.iDeletedContexts) {
|
|
1789
|
-
throw new Error("Cannot filter when delete requests are pending");
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
1786
|
if (this.hasPendingChanges(true)) {
|
|
1793
1787
|
throw new Error("Cannot filter due to pending changes");
|
|
1794
1788
|
}
|
|
@@ -2148,11 +2142,11 @@ sap.ui.define([
|
|
|
2148
2142
|
*
|
|
2149
2143
|
* If known, the value represents the sum of the element count of the collection on the server
|
|
2150
2144
|
* and the number of {@link sap.ui.model.odata.v4.Context#isInactive active}
|
|
2151
|
-
* {@link sap.ui.model.odata.v4.Context#isTransient transient} entities created on the client
|
|
2152
|
-
*
|
|
2153
|
-
* <code>Edm.Int64</code>. Since 1.91.0,
|
|
2154
|
-
* count is the leaf count on the server; it
|
|
2155
|
-
* system query option is given.
|
|
2145
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} entities created on the client,
|
|
2146
|
+
* minus the {@link #sap.ui.model.data.v4.Context#delete deleted} entities. Otherwise, it is
|
|
2147
|
+
* <code>undefined</code>. The value is a number of type <code>Edm.Int64</code>. Since 1.91.0,
|
|
2148
|
+
* in case of data aggregation with group levels, the count is the leaf count on the server; it
|
|
2149
|
+
* is only determined if the <code>$count</code> system query option is given.
|
|
2156
2150
|
*
|
|
2157
2151
|
* The count is known to the binding in the following situations:
|
|
2158
2152
|
* <ul>
|
|
@@ -2189,7 +2183,7 @@ sap.ui.define([
|
|
|
2189
2183
|
* Returns the contexts that were requested by a control last time. Does not trigger a data
|
|
2190
2184
|
* request. In the time between the {@link #event:dataRequested} event and the
|
|
2191
2185
|
* {@link #event:dataReceived} event, the resulting array contains <code>undefined</code> at
|
|
2192
|
-
* those indexes where the data is not yet available.
|
|
2186
|
+
* those indexes where the data is not yet available or has been deleted.
|
|
2193
2187
|
*
|
|
2194
2188
|
* @returns {sap.ui.model.odata.v4.Context[]}
|
|
2195
2189
|
* The contexts
|
|
@@ -2484,6 +2478,24 @@ sap.ui.define([
|
|
|
2484
2478
|
return oContext;
|
|
2485
2479
|
};
|
|
2486
2480
|
|
|
2481
|
+
/**
|
|
2482
|
+
* Returns a list of key predicates of all kept-alive contexts.
|
|
2483
|
+
*
|
|
2484
|
+
* @returns {string[]} The list of key predicates
|
|
2485
|
+
*
|
|
2486
|
+
* @private
|
|
2487
|
+
*/
|
|
2488
|
+
ODataListBinding.prototype.getKeepAlivePredicates = function () {
|
|
2489
|
+
var sBindingPath = this.getHeaderContext().getPath();
|
|
2490
|
+
|
|
2491
|
+
return Object.values(this.mPreviousContextsByPath).concat(this.aContexts)
|
|
2492
|
+
.filter(function (oContext) {
|
|
2493
|
+
return oContext.isKeepAlive();
|
|
2494
|
+
}).map(function (oContext) {
|
|
2495
|
+
return _Helper.getRelativePath(oContext.getPath(), sBindingPath);
|
|
2496
|
+
});
|
|
2497
|
+
};
|
|
2498
|
+
|
|
2487
2499
|
/**
|
|
2488
2500
|
* Returns the number of entries in the list. As long as the client does not know the size on
|
|
2489
2501
|
* the server, an estimated length is returned.
|
|
@@ -2760,10 +2772,6 @@ sap.ui.define([
|
|
|
2760
2772
|
});
|
|
2761
2773
|
}
|
|
2762
2774
|
|
|
2763
|
-
if (this.iDeletedContexts) {
|
|
2764
|
-
throw new Error("Cannot refresh when delete requests are pending");
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
2775
|
if (this.isRootBindingSuspended()) {
|
|
2768
2776
|
// Note: side-effects (incl. refresh) are forbidden while suspended
|
|
2769
2777
|
if (this.bSharedRequest) {
|
|
@@ -3236,6 +3244,11 @@ sap.ui.define([
|
|
|
3236
3244
|
return SyncPromise.resolve();
|
|
3237
3245
|
}
|
|
3238
3246
|
|
|
3247
|
+
if (!bSingle && this.oCache && this.oCache.isDeletingInOtherGroup(sGroupId)) {
|
|
3248
|
+
throw new Error("Must not request side effects when there is a pending delete in a"
|
|
3249
|
+
+ " different batch group");
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3239
3252
|
if (aPaths.indexOf("") < 0) {
|
|
3240
3253
|
if (bSingle) {
|
|
3241
3254
|
aContexts = [oContext];
|
|
@@ -3289,9 +3302,9 @@ sap.ui.define([
|
|
|
3289
3302
|
* as long as the binding is still empty.
|
|
3290
3303
|
* @param {boolean} [bDrop]
|
|
3291
3304
|
* By default, all created persisted contexts are dropped while transient ones are not.
|
|
3292
|
-
* <code>true</code> also drops transient ones, and
|
|
3293
|
-
* rows only and transient ones where the POST is not
|
|
3294
|
-
* the side-effects refresh.
|
|
3305
|
+
* (Deleted contexts are not affected here.) <code>true</code> also drops transient ones, and
|
|
3306
|
+
* <code>false</code> keeps inline creation rows only and transient ones where the POST is not
|
|
3307
|
+
* within the same $batch as the GET for the side-effects refresh.
|
|
3295
3308
|
* @param {string} [sGroupId]
|
|
3296
3309
|
* The group ID to be used for refresh; used only in case <code>bDrop === false</code>
|
|
3297
3310
|
*
|
|
@@ -3476,9 +3489,14 @@ sap.ui.define([
|
|
|
3476
3489
|
* details:
|
|
3477
3490
|
* <ul>
|
|
3478
3491
|
* <li> <code>grandTotal</code>: An optional boolean that tells whether a grand total for
|
|
3479
|
-
* this aggregatable property is needed (since 1.59.0);
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3492
|
+
* this aggregatable property is needed (since 1.59.0); not supported in this case are:
|
|
3493
|
+
* <ul>
|
|
3494
|
+
* <li> filtering by any aggregatable property (since 1.89.0),
|
|
3495
|
+
* <li> "$search" (since 1.93.0),
|
|
3496
|
+
* <li> the <code>vGroup</code> parameter of {@link sap.ui.model.Sorter}
|
|
3497
|
+
* (since 1.107.0),
|
|
3498
|
+
* <li> shared requests (since 1.108.0).
|
|
3499
|
+
* </ul>
|
|
3482
3500
|
* <li> <code>subtotals</code>: An optional boolean that tells whether subtotals for this
|
|
3483
3501
|
* aggregatable property are needed
|
|
3484
3502
|
* <li> <code>with</code>: An optional string that provides the name of the method (for
|
|
@@ -3511,17 +3529,25 @@ sap.ui.define([
|
|
|
3511
3529
|
* </ul>
|
|
3512
3530
|
* @param {string[]} [oAggregation.groupLevels]
|
|
3513
3531
|
* A list of groupable property names used to determine group levels. They may, but don't need
|
|
3514
|
-
* to, be repeated in <code>oAggregation.group</code>. Group levels cannot be combined with
|
|
3515
|
-
*
|
|
3516
|
-
*
|
|
3532
|
+
* to, be repeated in <code>oAggregation.group</code>. Group levels cannot be combined with:
|
|
3533
|
+
* <ul>
|
|
3534
|
+
* <li> filtering for aggregated properties,
|
|
3535
|
+
* <li> "$search" (since 1.93.0),
|
|
3536
|
+
* <li> the <code>vGroup</code> parameter of {@link sap.ui.model.Sorter} (since 1.107.0),
|
|
3537
|
+
* <li> shared requests (since 1.108.0).
|
|
3538
|
+
* </ul>
|
|
3517
3539
|
* @param {string} [oAggregation.hierarchyQualifier]
|
|
3518
3540
|
* The qualifier for the pair of "Org.OData.Aggregation.V1.RecursiveHierarchy" and
|
|
3519
3541
|
* "com.sap.vocabularies.Hierarchy.v1.RecursiveHierarchy" annotations at this binding's
|
|
3520
3542
|
* entity type (@experimental as of version 1.105.0). If present, a recursive hierarchy
|
|
3521
3543
|
* without data aggregation is defined, and the only other supported properties are
|
|
3522
3544
|
* <code>expandTo</code> and <code>search</code>. A recursive hierarchy cannot be combined
|
|
3523
|
-
* with
|
|
3524
|
-
*
|
|
3545
|
+
* with:
|
|
3546
|
+
* <ul>
|
|
3547
|
+
* <li> "$search",
|
|
3548
|
+
* <li> the <code>vGroup</code> parameter of {@link sap.ui.model.Sorter} (since 1.107.0),
|
|
3549
|
+
* <li> shared requests (since 1.108.0).
|
|
3550
|
+
* </ul>
|
|
3525
3551
|
* @param {string} [oAggregation.search]
|
|
3526
3552
|
* Like the <a href=
|
|
3527
3553
|
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html#_Search_System_Query"
|
|
@@ -3677,17 +3703,17 @@ sap.ui.define([
|
|
|
3677
3703
|
* the dynamic sorters.
|
|
3678
3704
|
* @returns {this}
|
|
3679
3705
|
* <code>this</code> to facilitate method chaining
|
|
3680
|
-
* @throws {Error}
|
|
3706
|
+
* @throws {Error}
|
|
3707
|
+
* If there are pending changes that cannot be ignored or an unsupported operation mode is
|
|
3708
|
+
* used (see {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
3709
|
+
* <br>
|
|
3710
|
+
* The following pending changes are ignored:
|
|
3681
3711
|
* <ul>
|
|
3682
|
-
* <li>
|
|
3683
|
-
*
|
|
3684
|
-
*
|
|
3685
|
-
*
|
|
3686
|
-
*
|
|
3687
|
-
* Since 1.98.0, {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts of a
|
|
3688
|
-
* {@link #getRootBinding root binding} do not count as pending changes.
|
|
3689
|
-
* <li> contexts are {@link sap.ui.model.data.v4.Context#delete deleted} on the client, but
|
|
3690
|
-
* the server request has not finished yet.
|
|
3712
|
+
* <li> changes relating to a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive}
|
|
3713
|
+
* context of this binding (since 1.97.0),
|
|
3714
|
+
* <li> {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts of a
|
|
3715
|
+
* {@link #getRootBinding root binding} (since 1.98.0),
|
|
3716
|
+
* <li> {@link sap.ui.model.odata.v4.Context#delete deleted} contexts (since 1.108.0).
|
|
3691
3717
|
* </ul>
|
|
3692
3718
|
*
|
|
3693
3719
|
* @public
|
|
@@ -3706,10 +3732,6 @@ sap.ui.define([
|
|
|
3706
3732
|
return this;
|
|
3707
3733
|
}
|
|
3708
3734
|
|
|
3709
|
-
if (this.iDeletedContexts) {
|
|
3710
|
-
throw new Error("Cannot sort when delete requests are pending");
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
3735
|
if (this.hasPendingChanges(true)) {
|
|
3714
3736
|
throw new Error("Cannot sort due to pending changes");
|
|
3715
3737
|
}
|
|
@@ -3761,11 +3783,11 @@ sap.ui.define([
|
|
|
3761
3783
|
* @param {boolean} [aAggregation[].max]
|
|
3762
3784
|
* Measures only: Whether the maximum value (ignoring currencies or units of measure) for this
|
|
3763
3785
|
* measure is needed (since 1.55.0); filtering and sorting is supported in this case
|
|
3764
|
-
* (since 1.58.0)
|
|
3786
|
+
* (since 1.58.0), but shared requests are not (since 1.108.0)
|
|
3765
3787
|
* @param {boolean} [aAggregation[].min]
|
|
3766
3788
|
* Measures only: Whether the minimum value (ignoring currencies or units of measure) for this
|
|
3767
3789
|
* measure is needed (since 1.55.0); filtering and sorting is supported in this case
|
|
3768
|
-
* (since 1.58.0)
|
|
3790
|
+
* (since 1.58.0), but shared requests are not (since 1.108.0)
|
|
3769
3791
|
* @param {string} [aAggregation[].with]
|
|
3770
3792
|
* Measures only: The name of the method (for example "sum") used for aggregation of this
|
|
3771
3793
|
* measure; see "3.1.2 Keyword with" (since 1.55.0)
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
* @hideconstructor
|
|
158
158
|
* @public
|
|
159
159
|
* @since 1.37.0
|
|
160
|
-
* @version 1.
|
|
160
|
+
* @version 1.108.1
|
|
161
161
|
*/
|
|
162
162
|
ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
163
163
|
constructor : constructor
|
|
@@ -1676,7 +1676,7 @@ sap.ui.define([
|
|
|
1676
1676
|
* @param {string} sPropertyPath
|
|
1677
1677
|
* A path of a property in the OData data model, absolute or relative to <code>oContext</code>
|
|
1678
1678
|
* @param {sap.ui.model.odata.v4.Context} oContext
|
|
1679
|
-
* A context, used for building the path and for
|
|
1679
|
+
* A context, used for building the path and for determining the key predicate
|
|
1680
1680
|
* @param {boolean} [bNoEditUrl]
|
|
1681
1681
|
* Whether no edit URL is required
|
|
1682
1682
|
* @returns {sap.ui.base.SyncPromise}
|
|
@@ -2446,8 +2446,9 @@ sap.ui.define([
|
|
|
2446
2446
|
* @param {string} sPropertyPath
|
|
2447
2447
|
* An absolute path to an OData property within the OData data model
|
|
2448
2448
|
* @returns {string|undefined}
|
|
2449
|
-
* The path of the property's unit or currency relative to the
|
|
2450
|
-
* <code>undefined</code> in case the property has no
|
|
2449
|
+
* The path of the property's unit or currency relative to the (entity or complex) type which
|
|
2450
|
+
* contains the original property, or <code>undefined</code> in case the property has no
|
|
2451
|
+
* associated unit or currency
|
|
2451
2452
|
*
|
|
2452
2453
|
* @private
|
|
2453
2454
|
*/
|
|
@@ -218,7 +218,7 @@ sap.ui.define([
|
|
|
218
218
|
* @extends sap.ui.model.Model
|
|
219
219
|
* @public
|
|
220
220
|
* @since 1.37.0
|
|
221
|
-
* @version 1.
|
|
221
|
+
* @version 1.108.1
|
|
222
222
|
*/
|
|
223
223
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
224
224
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -379,9 +379,11 @@ sap.ui.define([
|
|
|
379
379
|
}
|
|
380
380
|
this.aPrerenderingTasks = null; // @see #addPrerenderingTask
|
|
381
381
|
this.fnOptimisticBatchEnabler = null;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
382
|
+
// maps the path to the error for the next dataReceived event
|
|
383
|
+
this.mPath2DataReceivedError = {};
|
|
384
|
+
// maps a path to the difference between fireDataRequested and fireDataReceived calls, to
|
|
385
|
+
// ensure the events are respectively fired once for a GET request
|
|
386
|
+
this.mPath2DataRequestedCount = {};
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
/**
|
|
@@ -411,27 +413,36 @@ sap.ui.define([
|
|
|
411
413
|
|
|
412
414
|
/**
|
|
413
415
|
* The 'dataReceived' event is fired when the back-end data has been received on the client. It
|
|
414
|
-
* is only fired for GET requests and is to be used by applications to process an error.
|
|
416
|
+
* is only fired for GET requests and is to be used by applications to process an error. For
|
|
417
|
+
* each 'dataRequested' event, a 'dataReceived' event is fired.
|
|
415
418
|
*
|
|
416
|
-
* If back-end
|
|
419
|
+
* If a back-end request is successful, the event has almost no parameters. For compatibility
|
|
417
420
|
* with {@link sap.ui.model.Binding#event:dataReceived}, an event parameter
|
|
418
421
|
* <code>data : {}</code> is provided: "In error cases it will be undefined", but otherwise it
|
|
419
|
-
* is not.
|
|
422
|
+
* is not. For additional property requests, the absolute path to the entity is also available.
|
|
423
|
+
*
|
|
424
|
+
* The 'dataReceived' event can be triggered by a binding or by additional property requests for
|
|
425
|
+
* an entity that already has been requested. Events triggered by a binding may be bubbled up to
|
|
426
|
+
* the model, while events triggered by additional property requests are fired directly by the
|
|
427
|
+
* model.
|
|
420
428
|
*
|
|
421
429
|
* If a back-end request fails, the 'dataReceived' event provides an <code>Error</code> in the
|
|
422
|
-
* 'error' event parameter.
|
|
430
|
+
* 'error' event parameter. If multiple requests are processed within a single $batch
|
|
423
431
|
* (or even a single change set), the order of 'dataReceived' events is not guaranteed. For
|
|
424
432
|
* requests which are not processed because a previous request failed, <code>error.cause</code>
|
|
425
433
|
* points to the root cause error - you should either ignore those events, or unwrap the error
|
|
426
|
-
* to access the root cause immediately.
|
|
434
|
+
* to access the root cause immediately. For additional property requests, the absolute path to
|
|
435
|
+
* the entity is also available.
|
|
427
436
|
*
|
|
428
437
|
* @param {sap.ui.base.Event} oEvent
|
|
429
438
|
* @param {object} oEvent.getParameters()
|
|
430
439
|
* @param {object} [oEvent.getParameters().data]
|
|
431
440
|
* An empty data object if a back-end request succeeds
|
|
432
441
|
* @param {Error} [oEvent.getParameters().error]
|
|
433
|
-
* The error object if a back-end request failed.
|
|
434
|
-
*
|
|
442
|
+
* The error object if a back-end request failed.
|
|
443
|
+
* @param {string} [oEvent.getParameters().path]
|
|
444
|
+
* The absolute path to the entity which caused the event. The path is only provided for
|
|
445
|
+
* additional property requests; for other requests it is <code>undefined</code>.
|
|
435
446
|
*
|
|
436
447
|
* @event sap.ui.model.odata.v4.ODataModel#dataReceived
|
|
437
448
|
* @public
|
|
@@ -443,7 +454,17 @@ sap.ui.define([
|
|
|
443
454
|
|
|
444
455
|
/**
|
|
445
456
|
* The 'dataRequested' event is fired directly after data has been requested from a back end.
|
|
446
|
-
* It is only fired for GET requests.
|
|
457
|
+
* It is only fired for GET requests. For each 'dataRequested' event, a 'dataReceived' event is
|
|
458
|
+
* fired.
|
|
459
|
+
*
|
|
460
|
+
* For additional property requests, the absolute path to the entity is available as an event
|
|
461
|
+
* parameter.
|
|
462
|
+
*
|
|
463
|
+
* The 'dataRequested' event can be triggered by a binding or by additional property requests
|
|
464
|
+
* for an entity that already has been requested.
|
|
465
|
+
* Events triggered by a binding may be bubbled up to the model, while events triggered by
|
|
466
|
+
* additional property requests are fired directly by the model. Every GET request caused by
|
|
467
|
+
* additional properties is causing one 'dataRequested' event.
|
|
447
468
|
*
|
|
448
469
|
* There are two kinds of requests leading to such an event:
|
|
449
470
|
* <ul>
|
|
@@ -456,6 +477,10 @@ sap.ui.define([
|
|
|
456
477
|
* </ul>
|
|
457
478
|
*
|
|
458
479
|
* @param {sap.ui.base.Event} oEvent
|
|
480
|
+
* @param {object} oEvent.getParameters()
|
|
481
|
+
* @param {string} [oEvent.getParameters().path]
|
|
482
|
+
* The absolute path to the entity which caused the event. The path is only provided for
|
|
483
|
+
* additional property requests; for other requests it is <code>undefined</code>.
|
|
459
484
|
*
|
|
460
485
|
* @event sap.ui.model.odata.v4.ODataModel#dataRequested
|
|
461
486
|
* @public
|
|
@@ -843,11 +868,14 @@ sap.ui.define([
|
|
|
843
868
|
* inherited from the model's parameter "sharedRequests", see
|
|
844
869
|
* {@link sap.ui.model.odata.v4.ODataModel#constructor}. Supported since 1.80.0
|
|
845
870
|
* <b>Note:</b> These bindings are read-only, so they may be especially useful for value
|
|
846
|
-
* lists; the following APIs are <b>not</b> allowed
|
|
871
|
+
* lists; state messages (since 1.108.0) and the following APIs are <b>not</b> allowed
|
|
847
872
|
* <ul>
|
|
848
873
|
* <li> for the list binding itself:
|
|
849
874
|
* <ul>
|
|
850
875
|
* <li> {@link sap.ui.model.odata.v4.ODataListBinding#create}
|
|
876
|
+
* <li> {@link sap.ui.model.odata.v4.ODataListBinding#getKeepAliveContext} or
|
|
877
|
+
* {@link #getKeepAliveContext} as far as it affects such a list binding
|
|
878
|
+
* <li> {@link sap.ui.model.odata.v4.ODataListBinding#resetChanges}
|
|
851
879
|
* </ul>
|
|
852
880
|
* <li> for the {@link sap.ui.model.odata.v4.ODataListBinding#getHeaderContext header
|
|
853
881
|
* context} of a list binding:
|
|
@@ -858,8 +886,12 @@ sap.ui.define([
|
|
|
858
886
|
* <ul>
|
|
859
887
|
* <li> {@link sap.ui.model.odata.v4.Context#delete}
|
|
860
888
|
* <li> {@link sap.ui.model.odata.v4.Context#refresh}
|
|
889
|
+
* <li> {@link sap.ui.model.odata.v4.Context#replaceWith}
|
|
861
890
|
* <li> {@link sap.ui.model.odata.v4.Context#requestSideEffects}
|
|
891
|
+
* <li> {@link sap.ui.model.odata.v4.Context#setKeepAlive}
|
|
862
892
|
* <li> {@link sap.ui.model.odata.v4.Context#setProperty}
|
|
893
|
+
* <li> executing a bound operation using <code>bReplaceWithRVC</code>, see
|
|
894
|
+
* {@link sap.ui.model.odata.v4.ODataContextBinding#execute}
|
|
863
895
|
* </ul>
|
|
864
896
|
* <li> for a dependent property binding of the list binding:
|
|
865
897
|
* <ul>
|
|
@@ -1210,7 +1242,7 @@ sap.ui.define([
|
|
|
1210
1242
|
* Note: The parameters <code>mParameters</code>, <code>fnCallBack</code>, and
|
|
1211
1243
|
* <code>bReload</code> from {@link sap.ui.model.Model#createBindingContext} are not supported.
|
|
1212
1244
|
*
|
|
1213
|
-
* It is possible to create binding contexts pointing to metadata.
|
|
1245
|
+
* It is possible to create binding contexts pointing to metadata. A '##' is recognized
|
|
1214
1246
|
* as separator in the resolved path and splits it into two parts; note that '#' may also be
|
|
1215
1247
|
* used as separator but is deprecated since 1.51.
|
|
1216
1248
|
* The part before the separator is transformed into a metadata context (see
|
|
@@ -1555,43 +1587,49 @@ sap.ui.define([
|
|
|
1555
1587
|
};
|
|
1556
1588
|
|
|
1557
1589
|
/**
|
|
1558
|
-
* Fires
|
|
1559
|
-
*
|
|
1560
|
-
*
|
|
1561
|
-
* Fire only one event, even when many late properties are requested (and each request calls
|
|
1562
|
-
* this function). Use the first response error.
|
|
1590
|
+
* Fires a 'dataReceived' event. This function is only called for additional property requests
|
|
1591
|
+
* for an entity that already has been requested. Bubbling up from a binding goes directly to
|
|
1592
|
+
* fireEvent.
|
|
1563
1593
|
*
|
|
1564
1594
|
* @param {Error} [oError]
|
|
1565
|
-
* The error if
|
|
1595
|
+
* The error if an additional property request failed
|
|
1596
|
+
* @param {string} [sPath]
|
|
1597
|
+
* The absolute path to the entity
|
|
1566
1598
|
*
|
|
1567
1599
|
* @private
|
|
1568
1600
|
*/
|
|
1569
|
-
ODataModel.prototype.fireDataReceived = function (oError) {
|
|
1570
|
-
if (this.
|
|
1601
|
+
ODataModel.prototype.fireDataReceived = function (oError, sPath) {
|
|
1602
|
+
if (!(sPath in this.mPath2DataRequestedCount)) {
|
|
1571
1603
|
throw new Error("Received more data than requested");
|
|
1572
1604
|
}
|
|
1573
|
-
this.
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1605
|
+
this.mPath2DataRequestedCount[sPath] -= 1;
|
|
1606
|
+
// first error wins
|
|
1607
|
+
this.mPath2DataReceivedError[sPath] = this.mPath2DataReceivedError[sPath] || oError;
|
|
1608
|
+
if (this.mPath2DataRequestedCount[sPath] === 0) {
|
|
1609
|
+
this.fireEvent("dataReceived", this.mPath2DataReceivedError[sPath]
|
|
1610
|
+
? {error : this.mPath2DataReceivedError[sPath], path : sPath}
|
|
1611
|
+
: {data : {}, path : sPath});
|
|
1612
|
+
delete this.mPath2DataReceivedError[sPath];
|
|
1613
|
+
delete this.mPath2DataRequestedCount[sPath];
|
|
1579
1614
|
}
|
|
1580
1615
|
};
|
|
1581
1616
|
|
|
1582
1617
|
/**
|
|
1583
|
-
* Fires
|
|
1584
|
-
*
|
|
1618
|
+
* Fires a 'dataRequested' event. This function is only called for additional property requests
|
|
1619
|
+
* for an entity that already has been requested. Bubbling up from a binding goes directly to
|
|
1620
|
+
* fireEvent.
|
|
1585
1621
|
*
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
1622
|
+
* @param {string} [sPath]
|
|
1623
|
+
* The absolute path to the entity
|
|
1588
1624
|
*
|
|
1589
1625
|
* @private
|
|
1590
1626
|
*/
|
|
1591
|
-
ODataModel.prototype.fireDataRequested = function () {
|
|
1592
|
-
this.
|
|
1593
|
-
|
|
1594
|
-
|
|
1627
|
+
ODataModel.prototype.fireDataRequested = function (sPath) {
|
|
1628
|
+
if (sPath in this.mPath2DataRequestedCount) {
|
|
1629
|
+
this.mPath2DataRequestedCount[sPath] += 1;
|
|
1630
|
+
} else {
|
|
1631
|
+
this.mPath2DataRequestedCount[sPath] = 1;
|
|
1632
|
+
this.fireEvent("dataRequested", {path : sPath});
|
|
1595
1633
|
}
|
|
1596
1634
|
};
|
|
1597
1635
|
|
|
@@ -1959,10 +1997,11 @@ sap.ui.define([
|
|
|
1959
1997
|
};
|
|
1960
1998
|
|
|
1961
1999
|
/**
|
|
1962
|
-
* Returns <code>true</code> if there are pending changes,
|
|
1963
|
-
* (see {@link sap.ui.model.odata.v4.ODataListBinding#create})
|
|
1964
|
-
*
|
|
1965
|
-
* {@link sap.ui.model.odata.v4.Context#isInactive inactive}
|
|
2000
|
+
* Returns <code>true</code> if there are pending changes, which can be updates, created
|
|
2001
|
+
* entities (see {@link sap.ui.model.odata.v4.ODataListBinding#create}) or entity deletions
|
|
2002
|
+
* (see {@link sap.ui.model.odata.v4.Context#delete}) that have not yet been successfully sent
|
|
2003
|
+
* to the server. Since 1.98.0, {@link sap.ui.model.odata.v4.Context#isInactive inactive}
|
|
2004
|
+
* contexts are ignored.
|
|
1966
2005
|
*
|
|
1967
2006
|
* @param {string} [sGroupId]
|
|
1968
2007
|
* A group ID as specified in {@link sap.ui.model.odata.v4.ODataModel}, except group IDs
|
|
@@ -2400,7 +2439,7 @@ sap.ui.define([
|
|
|
2400
2439
|
*
|
|
2401
2440
|
* @function
|
|
2402
2441
|
* @public
|
|
2403
|
-
* @see #
|
|
2442
|
+
* @see #getKeyPredicate
|
|
2404
2443
|
* @since 1.107.0
|
|
2405
2444
|
*/
|
|
2406
2445
|
ODataModel.prototype.requestKeyPredicate = _Helper.createRequestMethod("fetchKeyPredicate");
|
|
@@ -2434,11 +2473,10 @@ sap.ui.define([
|
|
|
2434
2473
|
};
|
|
2435
2474
|
|
|
2436
2475
|
/**
|
|
2437
|
-
* Resets all property changes
|
|
2438
|
-
* have not been successfully submitted via {@link #submitBatch}. Resets also
|
|
2439
|
-
* input for the same group ID. This function does not reset the
|
|
2440
|
-
* (see {@link sap.ui.model.odata.v4.
|
|
2441
|
-
* (see {@link sap.ui.model.odata.v4.ODataContextBinding#execute}).
|
|
2476
|
+
* Resets all property changes, created entities, and entity deletions associated with the given
|
|
2477
|
+
* group ID which have not been successfully submitted via {@link #submitBatch}. Resets also
|
|
2478
|
+
* invalid user input for the same group ID. This function does not reset the execution of OData
|
|
2479
|
+
* operations (see {@link sap.ui.model.odata.v4.ODataContextBinding#execute}).
|
|
2442
2480
|
*
|
|
2443
2481
|
* @param {string} [sGroupId]
|
|
2444
2482
|
* A valid group ID as specified in {@link sap.ui.model.odata.v4.ODataModel}. If it is
|