@openui5/sap.ui.core 1.112.0 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +16 -1
- 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 +7 -7
- package/src/sap/base/security/URLWhitelist.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
- 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/ExpressionParser.js +15 -5
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +4 -2
- package/src/sap/ui/base/ManagedObjectMetadata.js +10 -12
- package/src/sap/ui/base/Metadata.js +23 -12
- 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 +8 -5
- 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 +58 -9
- package/src/sap/ui/core/Control.js +22 -5
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomStyleClassSupport.js +5 -2
- 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 +3 -2
- 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 +10 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.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 +2 -2
- package/src/sap/ui/core/LocaleData.js +87 -19
- package/src/sap/ui/core/Manifest.js +4 -4
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +19 -27
- package/src/sap/ui/core/RenderManager.js +7 -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 +3 -2
- 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/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +14 -26
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +32 -0
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +4 -4
- package/src/sap/ui/core/date/_Calendars.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/format/DateFormat.js +103 -30
- package/src/sap/ui/core/format/NumberFormat.js +40 -5
- package/src/sap/ui/core/format/TimezoneUtil.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/messagebundle_ar.properties +1 -1
- package/src/sap/ui/core/messagebundle_cs.properties +1 -1
- package/src/sap/ui/core/messagebundle_cy.properties +1 -1
- package/src/sap/ui/core/messagebundle_da.properties +1 -1
- package/src/sap/ui/core/messagebundle_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_el.properties +1 -1
- package/src/sap/ui/core/messagebundle_en.properties +1 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +1 -1
- package/src/sap/ui/core/messagebundle_es.properties +4 -4
- package/src/sap/ui/core/messagebundle_es_MX.properties +1 -1
- package/src/sap/ui/core/messagebundle_et.properties +1 -1
- package/src/sap/ui/core/messagebundle_fi.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr_CA.properties +1 -1
- package/src/sap/ui/core/messagebundle_hi.properties +1 -1
- package/src/sap/ui/core/messagebundle_hr.properties +1 -1
- package/src/sap/ui/core/messagebundle_hu.properties +1 -1
- package/src/sap/ui/core/messagebundle_id.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +1 -1
- package/src/sap/ui/core/messagebundle_iw.properties +1 -1
- package/src/sap/ui/core/messagebundle_kk.properties +1 -1
- package/src/sap/ui/core/messagebundle_lt.properties +1 -1
- package/src/sap/ui/core/messagebundle_lv.properties +1 -1
- package/src/sap/ui/core/messagebundle_nl.properties +1 -1
- package/src/sap/ui/core/messagebundle_no.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -1
- package/src/sap/ui/core/messagebundle_ro.properties +1 -1
- package/src/sap/ui/core/messagebundle_ru.properties +1 -1
- package/src/sap/ui/core/messagebundle_sh.properties +1 -1
- package/src/sap/ui/core/messagebundle_sk.properties +1 -1
- package/src/sap/ui/core/messagebundle_sl.properties +1 -1
- package/src/sap/ui/core/messagebundle_sv.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/messagebundle_tr.properties +1 -1
- package/src/sap/ui/core/messagebundle_uk.properties +1 -1
- package/src/sap/ui/core/messagebundle_vi.properties +1 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +1 -1
- package/src/sap/ui/core/messagebundle_zh_TW.properties +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 +3 -3
- 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/routing/Target.js +1 -1
- package/src/sap/ui/core/routing/Targets.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/base.less +3256 -19
- package/src/sap/ui/core/theming/ThemeManager.js +6 -3
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +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/CompositeBinding.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 +7 -3
- 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/ODataTreeBindingFlat.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 +19 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +36 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +4 -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 +32 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +19 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +72 -28
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +5 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +29 -10
- package/src/sap/ui/model/odata/v2/ODataModel.js +29 -17
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -1
- package/src/sap/ui/model/odata/v4/Context.js +33 -20
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -21
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +167 -65
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +4 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -25
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +87 -18
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +99 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +57 -2
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +3 -0
- 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/qunit-coverage-istanbul.js +180 -0
- package/src/sap/ui/qunit/qunit-coverage.js +9 -4
- 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/Opa.js +54 -21
- package/src/sap/ui/test/Opa5.js +181 -131
- package/src/sap/ui/test/OpaBuilder.js +106 -73
- package/src/sap/ui/test/OpaPlugin.js +8 -3
- package/src/sap/ui/test/RecordReplay.js +7 -3
- package/src/sap/ui/test/actions/EnterText.js +3 -2
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +3 -1
- package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -2
- package/src/sap/ui/test/starter/_configureLoader.js +7 -5
- package/src/sap/ui/test/starter/_setupAndStart.js +113 -27
- package/src/sap/ui/test/starter/_utils.js +4 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +3 -1
|
@@ -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.113.0
|
|
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
|
|
@@ -126,7 +126,9 @@ sap.ui.define([
|
|
|
126
126
|
// BEWARE: #doReplaceWith can insert a context w/ negative index, but w/o #created promise
|
|
127
127
|
// into aContexts' area of "created contexts"!
|
|
128
128
|
this.iCreatedContexts = 0; // number of (client-side) created contexts in aContexts
|
|
129
|
-
|
|
129
|
+
// Whether the binding is a nested binding within a deep create; it is true while using the
|
|
130
|
+
// parent cache so that it can contribute to the POST request (see #prepareDeepCreate)
|
|
131
|
+
this.bDeepCreate = false;
|
|
130
132
|
this.iDeletedContexts = 0; // number of (client-side) deleted contexts
|
|
131
133
|
this.oDiff = undefined;
|
|
132
134
|
this.aFilters = [];
|
|
@@ -135,7 +137,6 @@ sap.ui.define([
|
|
|
135
137
|
this.oHeaderContext = this.bRelative
|
|
136
138
|
? null
|
|
137
139
|
: Context.createNewContext(oModel, this, sPath);
|
|
138
|
-
this.bKeepCreated = false; // Whether the next createContexts shall keep created contexts
|
|
139
140
|
this.sOperationMode = mParameters.$$operationMode || oModel.sOperationMode;
|
|
140
141
|
// map<string,sap.ui.model.odata.v4.Context>
|
|
141
142
|
// Maps a string path to a v4.Context with that path. A context may either be
|
|
@@ -624,7 +625,7 @@ sap.ui.define([
|
|
|
624
625
|
if (oContext === this.oHeaderContext) {
|
|
625
626
|
throw new Error("Unsupported header context " + oContext);
|
|
626
627
|
}
|
|
627
|
-
if (this.mParameters
|
|
628
|
+
if (_Helper.isDataAggregation(this.mParameters)) {
|
|
628
629
|
throw new Error("Unsupported $$aggregation at " + this);
|
|
629
630
|
}
|
|
630
631
|
if (this.bSharedRequest) {
|
|
@@ -714,7 +715,17 @@ sap.ui.define([
|
|
|
714
715
|
* method then adds a transient entity to the parent's navigation property, which is sent with
|
|
715
716
|
* the payload of the parent entity. Such a nested context also has a
|
|
716
717
|
* {@link sap.ui.model.odata.v4.Context#created created} promise, which resolves when the deep
|
|
717
|
-
* create resolves.
|
|
718
|
+
* create resolves. <b>Beware:</b> After a succesful creation of the main entity the context
|
|
719
|
+
* returned for a nested entity is no longer valid. New contexts are created for the nested
|
|
720
|
+
* collection because it is not possible to reliably assign the response entities to those of
|
|
721
|
+
* the request, especially if the count differs.
|
|
722
|
+
*
|
|
723
|
+
* Deep create requires the <code>autoExpandSelect<code> parameter at the
|
|
724
|
+
* {@link sap.ui.model.odata.v4.ODataModel#constructor model}. The refresh after a deep create
|
|
725
|
+
* is optimized. Only the (navigation) properties missing from the POST response are actually
|
|
726
|
+
* requested. If the POST response contains all required properties, no request is sent at all.
|
|
727
|
+
*
|
|
728
|
+
* Deep create is an <b>experimental</b> API.
|
|
718
729
|
*
|
|
719
730
|
* Note: Creating at the end is only allowed if the final length of the binding is known (see
|
|
720
731
|
* {@link #isLengthFinal}), so that there is a clear position to place this entity at. This is
|
|
@@ -828,8 +839,11 @@ sap.ui.define([
|
|
|
828
839
|
that.fireEvent("createSent", {context : oContext});
|
|
829
840
|
}
|
|
830
841
|
).then(function (oCreatedEntity) { // the entity was created on the server
|
|
831
|
-
var sGroupId, sPredicate;
|
|
842
|
+
var bDeepCreate, sGroupId, sPredicate;
|
|
832
843
|
|
|
844
|
+
if (that.isTransient()) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
833
847
|
if (!(oInitialData && oInitialData["@$ui5.keepTransientPath"])) {
|
|
834
848
|
// refreshSingle requires the new key predicate in oContext.getPath()
|
|
835
849
|
sPredicate = _Helper.getPrivateAnnotation(oCreatedEntity, "predicate");
|
|
@@ -838,20 +852,17 @@ sap.ui.define([
|
|
|
838
852
|
that.oModel.checkMessages();
|
|
839
853
|
}
|
|
840
854
|
}
|
|
841
|
-
if (that.isTransient()) {
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
855
|
that.fireEvent("createCompleted", {context : oContext, success : true});
|
|
856
|
+
bDeepCreate = _Helper.getPrivateAnnotation(oCreatedEntity, "deepCreate");
|
|
857
|
+
_Helper.deletePrivateAnnotation(oCreatedEntity, "deepCreate");
|
|
845
858
|
sGroupId = that.getGroupId();
|
|
846
|
-
if (bSkipRefresh) {
|
|
847
|
-
oContext.updateAfterCreate();
|
|
848
|
-
return; // do not wait for late property requests to be finished!
|
|
849
|
-
}
|
|
850
859
|
if (that.oModel.isApiGroup(sGroupId)) {
|
|
851
860
|
sGroupId = "$auto";
|
|
852
861
|
}
|
|
853
|
-
|
|
854
|
-
return
|
|
862
|
+
// currently the optimized update w/o bSkipRefresh is restricted to deep create
|
|
863
|
+
return bSkipRefresh || bDeepCreate
|
|
864
|
+
? oContext.updateAfterCreate(bSkipRefresh, sGroupId)
|
|
865
|
+
: that.refreshSingle(oContext, that.lockGroup(sGroupId));
|
|
855
866
|
}, function (oError) {
|
|
856
867
|
oGroupLock.unlock(true); // createInCache failed, so the lock might still be blocking
|
|
857
868
|
throw oError;
|
|
@@ -940,17 +951,11 @@ sap.ui.define([
|
|
|
940
951
|
sPredicate = _Helper.getPrivateAnnotation(aResults[i], "predicate");
|
|
941
952
|
sContextPath = sPath + (sPredicate || "/" + i$skipIndex);
|
|
942
953
|
oContext = this.mPreviousContextsByPath[sContextPath];
|
|
943
|
-
if (oContext
|
|
944
|
-
&& (that.bKeepCreated || !oContext.created() || oContext.isKeepAlive())) {
|
|
954
|
+
if (oContext && (!oContext.created() || oContext.isKeepAlive())) {
|
|
945
955
|
// reuse the previous context, unless it is created (and persisted), but not
|
|
946
956
|
// kept alive
|
|
947
957
|
delete this.mPreviousContextsByPath[sContextPath];
|
|
948
|
-
|
|
949
|
-
this.iCreatedContexts += 1;
|
|
950
|
-
this.iActiveContexts += 1;
|
|
951
|
-
} else {
|
|
952
|
-
oContext.iIndex = i$skipIndex;
|
|
953
|
-
}
|
|
958
|
+
oContext.iIndex = i$skipIndex;
|
|
954
959
|
oContext.checkUpdate();
|
|
955
960
|
} else {
|
|
956
961
|
oContext = Context.create(oModel, this, sContextPath, i$skipIndex);
|
|
@@ -958,7 +963,6 @@ sap.ui.define([
|
|
|
958
963
|
this.aContexts[iStart + i] = oContext;
|
|
959
964
|
}
|
|
960
965
|
}
|
|
961
|
-
that.bKeepCreated = false;
|
|
962
966
|
// destroy previous contexts which are not reused or kept-alive
|
|
963
967
|
this.destroyPreviousContextsLater(Object.keys(this.mPreviousContextsByPath));
|
|
964
968
|
if (iCount !== undefined) { // server count is available or "non-empty short read"
|
|
@@ -1194,28 +1198,42 @@ sap.ui.define([
|
|
|
1194
1198
|
ODataListBinding.prototype.doCreateCache = function (sResourcePath, mQueryOptions, oContext,
|
|
1195
1199
|
sDeepResourcePath, sGroupId, oOldCache) {
|
|
1196
1200
|
var oCache,
|
|
1197
|
-
aKeepAlivePredicates
|
|
1201
|
+
aKeepAlivePredicates,
|
|
1202
|
+
mKeptElementsByPredicate;
|
|
1198
1203
|
|
|
1199
1204
|
if (oOldCache && oOldCache.getResourcePath() === sResourcePath
|
|
1200
1205
|
&& oOldCache.$deepResourcePath === sDeepResourcePath) {
|
|
1201
1206
|
aKeepAlivePredicates = this.getKeepAlivePredicates();
|
|
1202
1207
|
if (this.iCreatedContexts || this.iDeletedContexts || aKeepAlivePredicates.length) {
|
|
1203
|
-
oOldCache.reset(aKeepAlivePredicates, sGroupId);
|
|
1204
1208
|
// Note: #inheritQueryOptions as called below should not matter in case of own
|
|
1205
1209
|
// requests, which are a precondition for kept-alive elements
|
|
1206
|
-
oOldCache.
|
|
1210
|
+
oOldCache.reset(aKeepAlivePredicates, sGroupId, mQueryOptions,
|
|
1211
|
+
this.mParameters.$$aggregation, this.isGrouped());
|
|
1207
1212
|
|
|
1208
1213
|
return oOldCache;
|
|
1209
1214
|
}
|
|
1210
1215
|
}
|
|
1211
1216
|
|
|
1212
1217
|
mQueryOptions = this.inheritQueryOptions(mQueryOptions, oContext);
|
|
1213
|
-
|
|
1214
|
-
oCache
|
|
1218
|
+
oCache = this.getCacheAndMoveKeepAliveContexts(sResourcePath, mQueryOptions);
|
|
1219
|
+
if (oCache && this.mParameters.$$aggregation) {
|
|
1220
|
+
mKeptElementsByPredicate = {};
|
|
1221
|
+
aKeepAlivePredicates = this.getKeepAlivePredicates();
|
|
1222
|
+
aKeepAlivePredicates.forEach(function (sPredicate) {
|
|
1223
|
+
mKeptElementsByPredicate[sPredicate] = oCache.getValue(sPredicate);
|
|
1224
|
+
});
|
|
1225
|
+
oCache.setActive(false);
|
|
1226
|
+
oCache = undefined; // create _AggregationCache instead of _CollectionCache
|
|
1227
|
+
}
|
|
1228
|
+
oCache = oCache
|
|
1215
1229
|
|| _AggregationCache.create(this.oModel.oRequestor, sResourcePath, sDeepResourcePath,
|
|
1216
|
-
this.mParameters.$$aggregation,
|
|
1230
|
+
mQueryOptions, this.mParameters.$$aggregation, this.oModel.bAutoExpandSelect,
|
|
1217
1231
|
this.bSharedRequest, this.isGrouped());
|
|
1218
|
-
if (
|
|
1232
|
+
if (mKeptElementsByPredicate) {
|
|
1233
|
+
aKeepAlivePredicates.forEach(function (sPredicate) {
|
|
1234
|
+
oCache.addKeptElement(mKeptElementsByPredicate[sPredicate]);
|
|
1235
|
+
});
|
|
1236
|
+
} else if (this.bSharedRequest) {
|
|
1219
1237
|
oCache.registerChangeListener("", this);
|
|
1220
1238
|
}
|
|
1221
1239
|
|
|
@@ -1490,13 +1508,15 @@ sap.ui.define([
|
|
|
1490
1508
|
* @returns {sap.ui.base.SyncPromise<string>}
|
|
1491
1509
|
* A promise that is resolved with the download URL.
|
|
1492
1510
|
* @throws {Error}
|
|
1493
|
-
* If the binding is unresolved
|
|
1511
|
+
* If the binding is unresolved or is {@link #isTransient transient} (part of a
|
|
1512
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}),
|
|
1494
1513
|
*
|
|
1495
1514
|
* @private
|
|
1496
1515
|
*/
|
|
1497
1516
|
ODataListBinding.prototype.fetchDownloadUrl = function () {
|
|
1498
1517
|
var mUriParameters = this.oModel.mUriParameters;
|
|
1499
1518
|
|
|
1519
|
+
this.checkTransient();
|
|
1500
1520
|
if (!this.isResolved()) {
|
|
1501
1521
|
throw new Error("Binding is unresolved");
|
|
1502
1522
|
}
|
|
@@ -1790,10 +1810,14 @@ sap.ui.define([
|
|
|
1790
1810
|
* The filter type to be used
|
|
1791
1811
|
* @returns {this}
|
|
1792
1812
|
* <code>this</code> to facilitate method chaining
|
|
1793
|
-
* @throws {Error}
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1813
|
+
* @throws {Error} If
|
|
1814
|
+
* <ul>
|
|
1815
|
+
* <li> there are pending changes that cannot be ignored,
|
|
1816
|
+
* <li> the binding is {@link #isTransient transient} (part of a
|
|
1817
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}),
|
|
1818
|
+
* <li> an unsupported operation mode is used (see
|
|
1819
|
+
* {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
1820
|
+
* </ul>
|
|
1797
1821
|
* The following pending changes are ignored:
|
|
1798
1822
|
* <ul>
|
|
1799
1823
|
* <li> changes relating to a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive}
|
|
@@ -1812,6 +1836,7 @@ sap.ui.define([
|
|
|
1812
1836
|
ODataListBinding.prototype.filter = function (vFilters, sFilterType) {
|
|
1813
1837
|
var aFilters = _Helper.toArray(vFilters);
|
|
1814
1838
|
|
|
1839
|
+
this.checkTransient();
|
|
1815
1840
|
if (this.sOperationMode !== OperationMode.Server) {
|
|
1816
1841
|
throw new Error("Operation mode has to be sap.ui.model.odata.OperationMode.Server");
|
|
1817
1842
|
}
|
|
@@ -1888,8 +1913,9 @@ sap.ui.define([
|
|
|
1888
1913
|
* <li> "$NodeProperty" holds the path to the property which provides the hierarchy node
|
|
1889
1914
|
* value. That property is always $select'ed automatically and can be accessed as usual.
|
|
1890
1915
|
* </ul>
|
|
1891
|
-
* @returns {object}
|
|
1892
|
-
* The current data aggregation object, incl. some default values
|
|
1916
|
+
* @returns {object|undefined}
|
|
1917
|
+
* The current data aggregation object, incl. some default values, or <code>undefined</code>
|
|
1918
|
+
* if there is no data aggregation
|
|
1893
1919
|
*
|
|
1894
1920
|
* @public
|
|
1895
1921
|
* @since 1.109.0
|
|
@@ -2512,7 +2538,9 @@ sap.ui.define([
|
|
|
2512
2538
|
* <li> the binding is unresolved,
|
|
2513
2539
|
* <li> the given context path does not match this binding,
|
|
2514
2540
|
* <li> the binding's root binding is suspended,
|
|
2515
|
-
* <li>
|
|
2541
|
+
* <li> the binding is {@link #isTransient transient} (part of a
|
|
2542
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}).
|
|
2543
|
+
* <li> {@link sap.ui.model.odata.v4.Context#setKeepAlive} fails
|
|
2516
2544
|
* </ul>
|
|
2517
2545
|
*
|
|
2518
2546
|
* @public
|
|
@@ -2527,7 +2555,9 @@ sap.ui.define([
|
|
|
2527
2555
|
iPredicateIndex = _Helper.getPredicateIndex(sPath),
|
|
2528
2556
|
sResolvedPath = this.getResolvedPath();
|
|
2529
2557
|
|
|
2558
|
+
this.checkKeepAlive();
|
|
2530
2559
|
this.checkSuspended();
|
|
2560
|
+
this.checkTransient();
|
|
2531
2561
|
_Helper.checkGroupId(sGroupId);
|
|
2532
2562
|
if (!oContext) {
|
|
2533
2563
|
if (!sResolvedPath) {
|
|
@@ -2540,8 +2570,10 @@ sap.ui.define([
|
|
|
2540
2570
|
this.mPreviousContextsByPath[sPath] = oContext;
|
|
2541
2571
|
this.oCachePromise.then(function (oCache) {
|
|
2542
2572
|
// call ASAP so that dependent property bindings find the entity in the cache
|
|
2543
|
-
var oElement =
|
|
2573
|
+
var oElement = {};
|
|
2544
2574
|
|
|
2575
|
+
_Helper.setPrivateAnnotation(oElement, "predicate", sPath.slice(iPredicateIndex));
|
|
2576
|
+
oCache.addKeptElement(oElement);
|
|
2545
2577
|
if (sGroupId) {
|
|
2546
2578
|
_Helper.setPrivateAnnotation(oElement, "groupId", sGroupId);
|
|
2547
2579
|
}
|
|
@@ -2570,7 +2602,12 @@ sap.ui.define([
|
|
|
2570
2602
|
* @private
|
|
2571
2603
|
*/
|
|
2572
2604
|
ODataListBinding.prototype.getKeepAlivePredicates = function () {
|
|
2573
|
-
var sBindingPath
|
|
2605
|
+
var sBindingPath;
|
|
2606
|
+
|
|
2607
|
+
if (!this.getHeaderContext()) {
|
|
2608
|
+
return [];
|
|
2609
|
+
}
|
|
2610
|
+
sBindingPath = this.getHeaderContext().getPath();
|
|
2574
2611
|
|
|
2575
2612
|
return Object.values(this.mPreviousContextsByPath).concat(this.aContexts)
|
|
2576
2613
|
.filter(function (oContext) {
|
|
@@ -2879,8 +2916,9 @@ sap.ui.define([
|
|
|
2879
2916
|
};
|
|
2880
2917
|
|
|
2881
2918
|
/**
|
|
2882
|
-
* Prepares the binding for a deep create if there is a transient parent context. Adds a
|
|
2883
|
-
* transient collection to the parent binding's cache.
|
|
2919
|
+
* Prepares the nested binding for a deep create if there is a transient parent context. Adds a
|
|
2920
|
+
* transient collection to the parent binding's cache. Creates contexts for nested entities in
|
|
2921
|
+
* the initial data.
|
|
2884
2922
|
*
|
|
2885
2923
|
* @param {sap.ui.model.odata.v4.Context} [oContext]
|
|
2886
2924
|
* The parent context or <code>undefined</code> for absolute bindings
|
|
@@ -2893,8 +2931,11 @@ sap.ui.define([
|
|
|
2893
2931
|
*/
|
|
2894
2932
|
// @override sap.ui.model.odata.v4.ODataBinding#prepareDeepCreate
|
|
2895
2933
|
ODataListBinding.prototype.prepareDeepCreate = function (oContext, mQueryOptions) {
|
|
2934
|
+
var that = this;
|
|
2935
|
+
|
|
2896
2936
|
if (!(oContext && oContext.isTransient && oContext.isTransient()) || this.bDeepCreate) {
|
|
2897
2937
|
// only relevant if the context is transient and the binding is not in deep create yet
|
|
2938
|
+
this.bDeepCreate = false;
|
|
2898
2939
|
return false;
|
|
2899
2940
|
}
|
|
2900
2941
|
|
|
@@ -2904,8 +2945,27 @@ sap.ui.define([
|
|
|
2904
2945
|
// (in adjustPredicate)
|
|
2905
2946
|
this.mCacheQueryOptions = mQueryOptions;
|
|
2906
2947
|
oContext.withCache(function (oCache, sPath) {
|
|
2907
|
-
|
|
2908
|
-
|
|
2948
|
+
return oCache.addTransientCollection(sPath, mQueryOptions && mQueryOptions.$select);
|
|
2949
|
+
}, this.sPath
|
|
2950
|
+
).then(function (aInitialDataCollection) {
|
|
2951
|
+
var sResolvedPath = that.getResolvedPath();
|
|
2952
|
+
|
|
2953
|
+
aInitialDataCollection.forEach(function (oInitialData, i) {
|
|
2954
|
+
var oContext,
|
|
2955
|
+
sTransientPredicate
|
|
2956
|
+
= _Helper.getPrivateAnnotation(oInitialData, "transientPredicate"),
|
|
2957
|
+
oPromise = _Helper.getPrivateAnnotation(oInitialData, "promise");
|
|
2958
|
+
|
|
2959
|
+
oContext = Context.create(that.oModel, that, sResolvedPath + sTransientPredicate,
|
|
2960
|
+
i - aInitialDataCollection.length, oPromise, false, true);
|
|
2961
|
+
oContext.created().catch(function () { /* avoid "Uncaught (in promise) */ });
|
|
2962
|
+
|
|
2963
|
+
_Helper.setPrivateAnnotation(oInitialData, "context", oContext);
|
|
2964
|
+
_Helper.setPrivateAnnotation(oInitialData, "firstCreateAtEnd", false);
|
|
2965
|
+
_Helper.deletePrivateAnnotation(oInitialData, "promise");
|
|
2966
|
+
});
|
|
2967
|
+
// The binding gets these contexts via restoreCreated later
|
|
2968
|
+
});
|
|
2909
2969
|
|
|
2910
2970
|
return true;
|
|
2911
2971
|
};
|
|
@@ -3006,8 +3066,6 @@ sap.ui.define([
|
|
|
3006
3066
|
aDependentBindings = that.getDependentBindings();
|
|
3007
3067
|
that.reset(ChangeReason.Refresh, !oCache || (bKeepCacheOnError ? false : undefined),
|
|
3008
3068
|
sGroupId); // this may reset that.oRefreshPromise
|
|
3009
|
-
that.bKeepCreated = that.bDeepCreate;
|
|
3010
|
-
that.bDeepCreate = false;
|
|
3011
3069
|
return SyncPromise.all(
|
|
3012
3070
|
refreshAll(aDependentBindings).concat(oPromise, oKeptElementsPromise)
|
|
3013
3071
|
).then(function () {
|
|
@@ -3327,6 +3385,9 @@ sap.ui.define([
|
|
|
3327
3385
|
* A Promise that resolves with an {@link sap.ui.model.Filter} representing the entries with
|
|
3328
3386
|
* messages; it resolves with <code>null</code> if the binding is not resolved or if there is
|
|
3329
3387
|
* no message for any entry
|
|
3388
|
+
* @throws {Error}
|
|
3389
|
+
* If the binding is {@link #isTransient transient} (part of a
|
|
3390
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}).
|
|
3330
3391
|
*
|
|
3331
3392
|
* @protected
|
|
3332
3393
|
* @see sap.ui.model.ListBinding#requestFilterForMessages
|
|
@@ -3339,6 +3400,7 @@ sap.ui.define([
|
|
|
3339
3400
|
sResolvedPath = this.oHeaderContext && this.oHeaderContext.getPath(),
|
|
3340
3401
|
that = this;
|
|
3341
3402
|
|
|
3403
|
+
this.checkTransient();
|
|
3342
3404
|
if (!sResolvedPath) {
|
|
3343
3405
|
return Promise.resolve(null);
|
|
3344
3406
|
}
|
|
@@ -3732,10 +3794,13 @@ sap.ui.define([
|
|
|
3732
3794
|
* <li> the given data aggregation object is unsupported,
|
|
3733
3795
|
* <li> the <code>$apply</code> system query option has been specified explicitly before,
|
|
3734
3796
|
* <li> the binding has a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive}
|
|
3735
|
-
* context,
|
|
3797
|
+
* context when switching the use case of data aggregation (recursive hierarchy, pure data
|
|
3798
|
+
* aggregation, or none at all),
|
|
3736
3799
|
* <li> there are pending changes,
|
|
3737
3800
|
* <li> a recursive hierarchy is requested, but the model does not use the
|
|
3738
|
-
* <code>autoExpandSelect</code> parameter
|
|
3801
|
+
* <code>autoExpandSelect</code> parameter,
|
|
3802
|
+
* <li> the binding is {@link #isTransient transient} (part of a
|
|
3803
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}),
|
|
3739
3804
|
* </ul>
|
|
3740
3805
|
*
|
|
3741
3806
|
* @example <caption>First group level is product category including subtotals for the net
|
|
@@ -3764,17 +3829,25 @@ sap.ui.define([
|
|
|
3764
3829
|
ODataListBinding.prototype.setAggregation = function (oAggregation) {
|
|
3765
3830
|
var mParameters;
|
|
3766
3831
|
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3832
|
+
/*
|
|
3833
|
+
* Returns the use case of data aggregation (recursive hierarchy, pure data aggregation, or
|
|
3834
|
+
* none at all) as <code>true</code>, <code>false</code>, or <code>undefined</code>.
|
|
3835
|
+
*
|
|
3836
|
+
* @param {object} [oAggregation]
|
|
3837
|
+
* An object holding the information needed for data aggregation
|
|
3838
|
+
* @returns {boolean|undefined}
|
|
3839
|
+
* The use case of data aggregation
|
|
3840
|
+
*/
|
|
3841
|
+
function useCase(oDataAggregationObject) {
|
|
3842
|
+
return oDataAggregationObject && !!oDataAggregationObject.hierarchyQualifier;
|
|
3771
3843
|
}
|
|
3772
3844
|
|
|
3845
|
+
this.checkTransient();
|
|
3773
3846
|
if (this.hasPendingChanges()) {
|
|
3774
3847
|
throw new Error("Cannot set $$aggregation due to pending changes");
|
|
3775
3848
|
}
|
|
3776
|
-
if (
|
|
3777
|
-
|
|
3849
|
+
if (useCase(this.mParameters.$$aggregation) !== useCase(oAggregation)
|
|
3850
|
+
&& this.getKeepAlivePredicates().length) {
|
|
3778
3851
|
throw new Error("Cannot set $$aggregation due to a kept-alive context");
|
|
3779
3852
|
}
|
|
3780
3853
|
|
|
@@ -3783,7 +3856,6 @@ sap.ui.define([
|
|
|
3783
3856
|
delete mParameters.$$aggregation;
|
|
3784
3857
|
} else {
|
|
3785
3858
|
mParameters.$$aggregation = _Helper.clone(oAggregation);
|
|
3786
|
-
this.resetKeepAlive();
|
|
3787
3859
|
}
|
|
3788
3860
|
this.applyParameters(mParameters, "");
|
|
3789
3861
|
};
|
|
@@ -3876,9 +3948,14 @@ sap.ui.define([
|
|
|
3876
3948
|
* @returns {this}
|
|
3877
3949
|
* <code>this</code> to facilitate method chaining
|
|
3878
3950
|
* @throws {Error}
|
|
3879
|
-
*
|
|
3880
|
-
*
|
|
3881
|
-
*
|
|
3951
|
+
* @throws {Error} If
|
|
3952
|
+
* <ul>
|
|
3953
|
+
* <li> there are pending changes that cannot be ignored,
|
|
3954
|
+
* <li> the binding is {@link #isTransient transient} (part of a
|
|
3955
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}),
|
|
3956
|
+
* <li> an unsupported operation mode is used (see
|
|
3957
|
+
* {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
3958
|
+
* </ul>
|
|
3882
3959
|
* The following pending changes are ignored:
|
|
3883
3960
|
* <ul>
|
|
3884
3961
|
* <li> changes relating to a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive}
|
|
@@ -3896,6 +3973,7 @@ sap.ui.define([
|
|
|
3896
3973
|
ODataListBinding.prototype.sort = function (vSorters) {
|
|
3897
3974
|
var aSorters = _Helper.toArray(vSorters);
|
|
3898
3975
|
|
|
3976
|
+
this.checkTransient();
|
|
3899
3977
|
if (this.sOperationMode !== OperationMode.Server) {
|
|
3900
3978
|
throw new Error("Operation mode has to be sap.ui.model.odata.OperationMode.Server");
|
|
3901
3979
|
}
|
|
@@ -3931,13 +4009,37 @@ sap.ui.define([
|
|
|
3931
4009
|
* @override
|
|
3932
4010
|
* @see sap.ui.model.odata.v4.ODataBinding#updateAfterCreate
|
|
3933
4011
|
*/
|
|
3934
|
-
ODataListBinding.prototype.updateAfterCreate = function () {
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
: this.refreshInternal("");
|
|
4012
|
+
ODataListBinding.prototype.updateAfterCreate = function (bSkipRefresh, sGroupId) {
|
|
4013
|
+
var oPromise,
|
|
4014
|
+
oSideEffectsPromise,
|
|
4015
|
+
that = this;
|
|
3939
4016
|
|
|
3940
|
-
this.
|
|
4017
|
+
if (this.iCreatedContexts) { // deep create
|
|
4018
|
+
if (bSkipRefresh) {
|
|
4019
|
+
this.reset(ChangeReason.Change, true); // throw the old, transient contexts away
|
|
4020
|
+
} else {
|
|
4021
|
+
this.reset(undefined, true); // silently throw the old, transient contexts away
|
|
4022
|
+
// ensure that we have new contexts
|
|
4023
|
+
oSideEffectsPromise = this.fetchContexts(0, Infinity, 0, _GroupLock.$cached)
|
|
4024
|
+
.then(function () {
|
|
4025
|
+
that.iCurrentEnd = that.aContexts.length;
|
|
4026
|
+
return that.requestSideEffects(sGroupId,
|
|
4027
|
+
_Helper.getMissingPropertyPaths(
|
|
4028
|
+
that.fetchValue("", null, true).getResult(),
|
|
4029
|
+
that.mAggregatedQueryOptions));
|
|
4030
|
+
}).then(function () {
|
|
4031
|
+
// do not fire until requestSideEffects is finished to avoid unwanted
|
|
4032
|
+
// late property requests
|
|
4033
|
+
that._fireChange({reason : ChangeReason.Change});
|
|
4034
|
+
});
|
|
4035
|
+
}
|
|
4036
|
+
oPromise = SyncPromise.all([
|
|
4037
|
+
oSideEffectsPromise,
|
|
4038
|
+
asODataParentBinding.prototype.updateAfterCreate.apply(this, arguments)
|
|
4039
|
+
]);
|
|
4040
|
+
} else { // full refresh to see if the server created some
|
|
4041
|
+
oPromise = this.refreshInternal("", sGroupId);
|
|
4042
|
+
}
|
|
3941
4043
|
|
|
3942
4044
|
return oPromise;
|
|
3943
4045
|
};
|
|
@@ -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.113.0
|
|
161
161
|
*/
|
|
162
162
|
ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
163
163
|
constructor : constructor
|
|
@@ -706,6 +706,7 @@ sap.ui.define([
|
|
|
706
706
|
this.sDefaultBindingMode = BindingMode.OneTime;
|
|
707
707
|
this.mETags = {};
|
|
708
708
|
this.sLanguage = sLanguage;
|
|
709
|
+
// no need to use UI5Date.getInstance as only the timestamp is relevant
|
|
709
710
|
this.oLastModified = new Date(0);
|
|
710
711
|
this.oMetadataPromise = null;
|
|
711
712
|
this.oModel = oModel;
|
|
@@ -3479,8 +3480,10 @@ sap.ui.define([
|
|
|
3479
3480
|
}
|
|
3480
3481
|
|
|
3481
3482
|
// handle & remove Date, ETag and Last-Modified headers
|
|
3483
|
+
// no need to use UI5Date.getInstance as only the timestamp is relevant
|
|
3482
3484
|
oLastModified = mScope.$LastModified ? new Date(mScope.$LastModified) : null;
|
|
3483
3485
|
this.mETags[sUrl] = mScope.$ETag ? mScope.$ETag : oLastModified;
|
|
3486
|
+
// no need to use UI5Date.getInstance as only the timestamp is relevant
|
|
3484
3487
|
oDate = mScope.$Date ? new Date(mScope.$Date) : new Date();
|
|
3485
3488
|
oLastModified = oLastModified || oDate; // @see #getLastModified
|
|
3486
3489
|
if (this.oLastModified < oLastModified) {
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
* @extends sap.ui.model.Model
|
|
228
228
|
* @public
|
|
229
229
|
* @since 1.37.0
|
|
230
|
-
* @version 1.
|
|
230
|
+
* @version 1.113.0
|
|
231
231
|
*/
|
|
232
232
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
233
233
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -881,8 +881,9 @@ sap.ui.define([
|
|
|
881
881
|
* Whether this binding is considered for a match when {@link #getKeepAliveContext} is called;
|
|
882
882
|
* only the value <code>true</code> is allowed. Must not be combined with <code>$apply</code>,
|
|
883
883
|
* <code>$$aggregation</code>, <code>$$canonicalPath</code>, or <code>$$sharedRequest</code>.
|
|
884
|
-
* If the binding is relative, <code>$$ownRequest</code> must be set as well.
|
|
885
|
-
*
|
|
884
|
+
* If the binding is relative, <code>$$ownRequest</code> must be set as well. Supported since
|
|
885
|
+
* 1.99.0; since 1.113.0 it can be combined with <code>$$aggregation</code> for a recursive
|
|
886
|
+
* hierarchy.
|
|
886
887
|
* @param {string} [mParameters.$$groupId]
|
|
887
888
|
* The group ID to be used for <b>read</b> requests triggered by this binding; if not
|
|
888
889
|
* specified, either the parent binding's group ID (if the binding is relative) or the
|
|
@@ -333,19 +333,27 @@ sap.ui.define([
|
|
|
333
333
|
* @param {object} mParameters
|
|
334
334
|
* Map of binding parameters, see {@link sap.ui.model.odata.v4.ODataModel#bindList} and
|
|
335
335
|
* {@link sap.ui.model.odata.v4.ODataModel#bindContext}
|
|
336
|
-
* @throws {Error}
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
336
|
+
* @throws {Error} If
|
|
337
|
+
* <ul>
|
|
338
|
+
* <li> there are pending changes that cannot be ignored,
|
|
339
|
+
* <li> the binding is {@link #isTransient transient} (part of a
|
|
340
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#create deep create}),
|
|
341
|
+
* <li> <code>mParameters</code> is missing, contains binding-specific or unsupported
|
|
342
|
+
* parameters, contains unsupported values, or contains the property "$expand" or
|
|
343
|
+
* "$select" when the model is in auto-$expand/$select mode.
|
|
344
|
+
* </ul>
|
|
345
|
+
* The following exceptions apply:
|
|
346
|
+
* <ul>
|
|
347
|
+
* <li> Since 1.90.0, binding-specific parameters are ignored if they are unchanged.
|
|
348
|
+
* <li> Since 1.93.0, string values for "$expand" and "$select" are ignored if they are
|
|
349
|
+
* unchanged; pending changes are ignored if all parameters are unchanged.
|
|
350
|
+
* <li> Since 1.97.0, pending changes are ignored if they relate to a
|
|
351
|
+
* {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive} context of this binding.
|
|
352
|
+
* <li> Since 1.98.0, {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts
|
|
353
|
+
* of a {@link #getRootBinding root binding} do not count as pending changes.
|
|
354
|
+
* <li> Since 1.108.0, {@link sap.ui.model.odata.v4.Context#delete deleted} contexts do not
|
|
355
|
+
* count as pending changes.
|
|
356
|
+
* </ul>
|
|
349
357
|
*
|
|
350
358
|
* @public
|
|
351
359
|
* @since 1.45.0
|
|
@@ -386,6 +394,7 @@ sap.ui.define([
|
|
|
386
394
|
}
|
|
387
395
|
}
|
|
388
396
|
|
|
397
|
+
this.checkTransient();
|
|
389
398
|
if (!mParameters) {
|
|
390
399
|
throw new Error("Missing map of binding parameters");
|
|
391
400
|
}
|
|
@@ -1057,7 +1066,7 @@ sap.ui.define([
|
|
|
1057
1066
|
* @see sap.ui.model.odata.v4.ODataBinding#hasPendingChangesInDependents
|
|
1058
1067
|
*/
|
|
1059
1068
|
ODataParentBinding.prototype.hasPendingChangesInDependents = function (bIgnoreKeptAlive0,
|
|
1060
|
-
|
|
1069
|
+
sPathPrefix) {
|
|
1061
1070
|
return this.getDependentBindings().some(function (oDependent) {
|
|
1062
1071
|
var oCache = oDependent.oCache,
|
|
1063
1072
|
bHasPendingChanges,
|
|
@@ -1080,20 +1089,20 @@ sap.ui.define([
|
|
|
1080
1089
|
} else if (oDependent.hasPendingChangesForPath("")) {
|
|
1081
1090
|
return true;
|
|
1082
1091
|
}
|
|
1083
|
-
if (oDependent.mCacheByResourcePath
|
|
1092
|
+
if (oDependent.mCacheByResourcePath) {
|
|
1084
1093
|
bHasPendingChanges = Object.keys(oDependent.mCacheByResourcePath)
|
|
1085
1094
|
.some(function (sPath) {
|
|
1086
1095
|
var oCacheForPath = oDependent.mCacheByResourcePath[sPath];
|
|
1087
1096
|
|
|
1088
|
-
return
|
|
1097
|
+
return (!sPathPrefix || sPath.startsWith(sPathPrefix.slice(1)))
|
|
1098
|
+
&& oCacheForPath !== oCache // don't ask again
|
|
1089
1099
|
&& oCacheForPath.hasPendingChangesForPath("");
|
|
1090
1100
|
});
|
|
1091
1101
|
if (bHasPendingChanges) {
|
|
1092
1102
|
return true;
|
|
1093
1103
|
}
|
|
1094
1104
|
}
|
|
1095
|
-
return oDependent.hasPendingChangesInDependents(bIgnoreKeptAlive,
|
|
1096
|
-
bIgnoreInactiveCaches);
|
|
1105
|
+
return oDependent.hasPendingChangesInDependents(bIgnoreKeptAlive, sPathPrefix);
|
|
1097
1106
|
})
|
|
1098
1107
|
|| this.oModel.withUnresolvedBindings("hasPendingChangesInCaches",
|
|
1099
1108
|
this.getResolvedPath().slice(1));
|
|
@@ -1217,8 +1226,7 @@ sap.ui.define([
|
|
|
1217
1226
|
* @override
|
|
1218
1227
|
* @see sap.ui.model.odata.v4.ODataBinding#resetChangesInDependents
|
|
1219
1228
|
*/
|
|
1220
|
-
ODataParentBinding.prototype.resetChangesInDependents = function (aPromises,
|
|
1221
|
-
bIgnoreInactiveCaches) {
|
|
1229
|
+
ODataParentBinding.prototype.resetChangesInDependents = function (aPromises, sPathPrefix) {
|
|
1222
1230
|
this.getDependentBindings().forEach(function (oDependent) {
|
|
1223
1231
|
aPromises.push(oDependent.oCachePromise.then(function (oCache) {
|
|
1224
1232
|
if (oCache) {
|
|
@@ -1228,14 +1236,16 @@ sap.ui.define([
|
|
|
1228
1236
|
}).unwrap());
|
|
1229
1237
|
|
|
1230
1238
|
// mCacheByResourcePath may have changes nevertheless
|
|
1231
|
-
if (oDependent.mCacheByResourcePath
|
|
1239
|
+
if (oDependent.mCacheByResourcePath) {
|
|
1232
1240
|
Object.keys(oDependent.mCacheByResourcePath).forEach(function (sPath) {
|
|
1233
|
-
|
|
1241
|
+
if (!sPathPrefix || sPath.startsWith(sPathPrefix.slice(1))) {
|
|
1242
|
+
oDependent.mCacheByResourcePath[sPath].resetChangesForPath("");
|
|
1243
|
+
}
|
|
1234
1244
|
});
|
|
1235
1245
|
}
|
|
1236
1246
|
// Reset dependents, they might have no cache, but pending changes in
|
|
1237
1247
|
// mCacheByResourcePath
|
|
1238
|
-
oDependent.resetChangesInDependents(aPromises,
|
|
1248
|
+
oDependent.resetChangesInDependents(aPromises, sPathPrefix);
|
|
1239
1249
|
});
|
|
1240
1250
|
};
|
|
1241
1251
|
|
|
@@ -1442,9 +1452,9 @@ sap.ui.define([
|
|
|
1442
1452
|
* @override
|
|
1443
1453
|
* @see sap.ui.model.odata.v4.ODataBinding#updateAfterCreate
|
|
1444
1454
|
*/
|
|
1445
|
-
ODataParentBinding.prototype.updateAfterCreate = function () {
|
|
1455
|
+
ODataParentBinding.prototype.updateAfterCreate = function (bSkipRefresh, sGroupId) {
|
|
1446
1456
|
return SyncPromise.all(this.getDependentBindings().map(function (oDependentBinding) {
|
|
1447
|
-
return oDependentBinding.updateAfterCreate();
|
|
1457
|
+
return oDependentBinding.updateAfterCreate(bSkipRefresh, sGroupId);
|
|
1448
1458
|
}));
|
|
1449
1459
|
};
|
|
1450
1460
|
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @mixes sap.ui.model.odata.v4.ODataBinding
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.37.0
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.113.0
|
|
46
46
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
47
47
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
48
48
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|