@openui5/sap.ui.core 1.92.0 → 1.93.3
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/{.eslintrc → .eslintrc.json} +0 -0
- package/.reuse/dep5 +5 -0
- package/THIRDPARTY.txt +10 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +5 -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 -4
- package/src/sap/base/i18n/ResourceBundle.js +2 -2
- package/src/sap/base/util/Properties.js +4 -1
- package/src/sap/base/util/isEmptyObject.js +1 -2
- 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/VersionInfo.js +1 -0
- package/src/sap/ui/base/DataType.js +1 -0
- 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 +120 -18
- package/src/sap/ui/base/ManagedObjectMetadata.js +14 -5
- 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 +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +4 -1
- package/src/sap/ui/core/Component.js +143 -42
- 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 +2 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +18 -21
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +2 -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/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +9 -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 +124 -69
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +53 -80
- package/src/sap/ui/core/Placeholder.js +1 -0
- package/src/sap/ui/core/Popup.js +29 -5
- package/src/sap/ui/core/RenderManager.js +25 -22
- 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/ThemeCheck.js +13 -61
- 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 +5 -2
- package/src/sap/ui/core/UIComponent.js +46 -32
- 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/XMLTemplateProcessor.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 +2 -9
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +41 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +2 -0
- package/src/sap/ui/core/format/NumberFormat.js +2 -0
- 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 +3 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/mvc/Controller.js +146 -8
- package/src/sap/ui/core/mvc/HTMLView.js +3 -1
- package/src/sap/ui/core/mvc/JSONView.js +7 -5
- package/src/sap/ui/core/mvc/JSView.js +4 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +16 -5
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +13 -9
- 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/History.js +26 -16
- package/src/sap/ui/core/routing/Route.js +10 -1
- package/src/sap/ui/core/routing/Router.js +8 -5
- package/src/sap/ui/core/routing/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +26 -0
- package/src/sap/ui/core/routing/async/Route.js +6 -3
- package/src/sap/ui/core/routing/async/Target.js +29 -4
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/App.support.js +35 -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/controls/ObjectViewer.js +5 -9
- 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/MessageTest.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/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -0
- package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
- package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
- package/src/sap/ui/core/themes/base/base.less +569 -414
- package/src/sap/ui/core/themes/base/global.less +38 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -2
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
- package/src/sap/ui/core/theming/Parameters.js +221 -59
- package/src/sap/ui/core/theming/ThemeHelper.js +94 -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 +2 -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 +20 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +18 -0
- 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 +2 -2
- package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
- 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/events/jquery/EventSimulation.js +7 -6
- package/src/sap/ui/events/jquery/EventTriggerHook.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/Context.js +31 -11
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +19 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +3 -3
- package/src/sap/ui/model/SelectionModel.js +5 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -6
- package/src/sap/ui/model/base/ManagedObjectModel.js +9 -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/ODataListBinding.js +1 -0
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +3 -2
- 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/ODataUtils.js +19 -0
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +30 -27
- 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 +7 -2
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +3 -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 +7 -2
- package/src/sap/ui/model/odata/type/UnitMixin.js +20 -7
- package/src/sap/ui/model/odata/v2/Context.js +165 -0
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +19 -5
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +18 -78
- package/src/sap/ui/model/odata/v2/ODataModel.js +74 -52
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +55 -41
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +16 -10
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +39 -21
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +3 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +15 -15
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -6
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +5 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +7 -6
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +17 -2
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +3 -2
- 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/performance/Measurement.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +2 -1
- package/src/sap/ui/performance/trace/Interaction.js +11 -9
- package/src/sap/ui/qunit/QUnitUtils.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/security/FrameOptions.js +2 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -0
- package/src/sap/ui/test/TestUtils.js +17 -30
- package/src/sap/ui/test/launchers/componentLauncher.js +2 -1
- package/src/sap/ui/test/opaQunit.js +6 -9
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
- package/src/sap/ui/thirdparty/IPv6.js +2 -2
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
- package/src/sap/ui/thirdparty/URI.js +14 -5
- package/src/sap/ui/thirdparty/URITemplate.js +2 -2
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +10 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +5 -2
|
@@ -84,6 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
this["_sapui_Extensions"] = {};
|
|
85
85
|
Controller.extendByMember(this, false);
|
|
86
86
|
this._sapui_isExtended = false;
|
|
87
|
+
this._aDestroyables = [];
|
|
87
88
|
},
|
|
88
89
|
/**
|
|
89
90
|
* Wether a controller is extended or not
|
|
@@ -595,16 +596,60 @@ sap.ui.define([
|
|
|
595
596
|
return mPublicFunctions;
|
|
596
597
|
};
|
|
597
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Returns the list of Promises for which an automatic destroy is scheduled.
|
|
601
|
+
* Logs an error in case the application controller is missing a mandatory
|
|
602
|
+
* constructor super call.
|
|
603
|
+
* For compatibility reason we must not fail in this obviously broken scenario!
|
|
604
|
+
*
|
|
605
|
+
* @private
|
|
606
|
+
*/
|
|
607
|
+
Controller.prototype._getDestroyables = function() {
|
|
608
|
+
if (!this._aDestroyables) {
|
|
609
|
+
Log.error("Mandatory super constructor not called for Controller: '" + this.getMetadata().getName() + "'.",
|
|
610
|
+
null,
|
|
611
|
+
"sap.ui.support",
|
|
612
|
+
function() {
|
|
613
|
+
return { type: "missingSuperConstructor" };
|
|
614
|
+
});
|
|
615
|
+
this._aDestroyables = [];
|
|
616
|
+
}
|
|
617
|
+
return this._aDestroyables;
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Takes care of async destruction of fragments created with {@link sap.ui.core.Controller.loadFragment loadFragment}
|
|
622
|
+
*
|
|
623
|
+
* @private
|
|
624
|
+
*/
|
|
625
|
+
Controller.prototype.destroyFragments = function() {
|
|
626
|
+
function fnDestroy(vContent) {
|
|
627
|
+
vContent = Array.isArray(vContent) ? vContent : [vContent];
|
|
628
|
+
for (var i = 0; i < vContent.length; i++) {
|
|
629
|
+
if (!vContent[i].isDestroyed()) {
|
|
630
|
+
vContent[i].destroy();
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
// chain each cancelable to trigger an async destroy
|
|
635
|
+
var aDestroyables = this._getDestroyables();
|
|
636
|
+
for (var i = 0; i < aDestroyables.length; i++ ) {
|
|
637
|
+
aDestroyables[i] = aDestroyables[i].then(fnDestroy);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
598
641
|
/**
|
|
599
642
|
* Fire event when destroying a controller to cleanup extensions
|
|
600
643
|
* @private
|
|
601
644
|
*/
|
|
602
645
|
Controller.prototype.destroy = function() {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
646
|
+
if (this["_sapui_Extensions"]) {
|
|
647
|
+
Object.keys(this["_sapui_Extensions"]).forEach(function(sKey) {
|
|
648
|
+
var oExtensionInfo = this["_sapui_Extensions"][sKey];
|
|
649
|
+
ObjectPath.set(oExtensionInfo.location, null, this);
|
|
650
|
+
}.bind(this));
|
|
651
|
+
delete this["_sapui_Extensions"];
|
|
652
|
+
}
|
|
608
653
|
EventProvider.prototype.destroy.apply(this, arguments);
|
|
609
654
|
};
|
|
610
655
|
|
|
@@ -661,8 +706,12 @@ sap.ui.define([
|
|
|
661
706
|
* @public
|
|
662
707
|
*/
|
|
663
708
|
Controller.prototype.getOwnerComponent = function () {
|
|
664
|
-
var Component = sap.ui.
|
|
665
|
-
|
|
709
|
+
var Component = sap.ui.require("sap/ui/core/Component");
|
|
710
|
+
if (Component) {
|
|
711
|
+
return Component.getOwnerComponentFor(this.getView());
|
|
712
|
+
} else {
|
|
713
|
+
return undefined;
|
|
714
|
+
}
|
|
666
715
|
};
|
|
667
716
|
|
|
668
717
|
|
|
@@ -674,6 +723,9 @@ sap.ui.define([
|
|
|
674
723
|
}
|
|
675
724
|
if (this.onExit) {
|
|
676
725
|
oView.attachBeforeExit(this.onExit, this);
|
|
726
|
+
if (oView.bControllerIsViewManaged) {
|
|
727
|
+
oView.attachBeforeExit(this.destroyFragments, this);
|
|
728
|
+
}
|
|
677
729
|
}
|
|
678
730
|
if (this.onAfterRendering) {
|
|
679
731
|
oView.attachAfterRendering(this.onAfterRendering, this);
|
|
@@ -681,9 +733,95 @@ sap.ui.define([
|
|
|
681
733
|
if (this.onBeforeRendering) {
|
|
682
734
|
oView.attachBeforeRendering(this.onBeforeRendering, this);
|
|
683
735
|
}
|
|
684
|
-
//oView.addDelegate(this);
|
|
685
736
|
};
|
|
686
737
|
|
|
738
|
+
/**
|
|
739
|
+
* Loads a Fragment by {@link sap.ui.core.Fragment.load}. If the controller will be destroyed before
|
|
740
|
+
* the fragment content creation is done, the controller takes care of an asynchronous destroy of the
|
|
741
|
+
* fragment content.
|
|
742
|
+
* Otherwise the content must be destroyed by the caller as usual.
|
|
743
|
+
* If the controller has an owner component, it is passed to the fragment content.
|
|
744
|
+
* The fragment content will be prefixed with the view ID to avoid duplicate ID issues.
|
|
745
|
+
* The prefixing is enabled by default and can be switched off by the <code>autoPrefixId</code> option.
|
|
746
|
+
*
|
|
747
|
+
* When <code>autoPrefixId</code> is enabled, the fragment content can be accessed by calling {@link sap.ui.core.mvc.Controller.byId}.
|
|
748
|
+
*
|
|
749
|
+
* Example (no mOptions.id given):
|
|
750
|
+
* var myCOntrol = this.byId("myControl");
|
|
751
|
+
*
|
|
752
|
+
* Example (mOptions.id given):
|
|
753
|
+
* var myCOntrol = this.byId("prefix--myControl");
|
|
754
|
+
*
|
|
755
|
+
* The fragment content will be added to the <code>dependents</code> aggregation of the view by default.
|
|
756
|
+
* This behavior can be suppressed by setting <code>mOptions.addToDependents</code> to false.
|
|
757
|
+
*
|
|
758
|
+
* Note: If the fragment content is not aggregated within a control, it must be destroyed manually in
|
|
759
|
+
* the exit hook of the controller.
|
|
760
|
+
*
|
|
761
|
+
* The controller is passed to the Fragment by default so the (event handler) methods referenced in the Fragment will
|
|
762
|
+
* be called on this Controller.
|
|
763
|
+
*
|
|
764
|
+
* @param {object} mOptions Options regarding fragment loading
|
|
765
|
+
* @param {string} mOptions.name The Fragment name, which must correspond to a Fragment which can be loaded via the module system
|
|
766
|
+
* (fragmentName + suffix ".fragment.[typeextension]") and which contains the Fragment definition.
|
|
767
|
+
* @param {object} [mOptions.addToDependents=true] Whether the fragment content should be added to the <code>dependents</code> aggregation of the view
|
|
768
|
+
* @param {object} [mOptions.autoPrefixId=true] Whether the IDs of the fragment content will be prefixed by the view ID
|
|
769
|
+
* @param {string} [mOptions.id] the ID of the Fragment
|
|
770
|
+
* @param {string} [mOptions.type=XML] the Fragment type, e.g. "XML", "JS", or "HTML" (see above). Default is "XML"
|
|
771
|
+
* @return {Promise} A Promise that resolves with the fragment content
|
|
772
|
+
*
|
|
773
|
+
* @since 1.93
|
|
774
|
+
* @public
|
|
775
|
+
*/
|
|
776
|
+
Controller.prototype.loadFragment = function(mOptions) {
|
|
777
|
+
if (!this.getView()) {
|
|
778
|
+
throw new Error("Calling 'loadFragment' without a view attached is not supported!");
|
|
779
|
+
} else if (!mOptions || !mOptions.name) {
|
|
780
|
+
throw new Error("oOptions must provide at least a fragment name!");
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
var oOwnerComponent = this.getOwnerComponent();
|
|
784
|
+
var bAddToDependents = mOptions.addToDependents !== false;
|
|
785
|
+
var bAutoPrefixId = mOptions.autoPrefixId !== false;
|
|
786
|
+
|
|
787
|
+
var oFragmentOptions = {
|
|
788
|
+
name: mOptions.name,
|
|
789
|
+
type: mOptions.type,
|
|
790
|
+
id: mOptions.id,
|
|
791
|
+
controller: this
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
var aDestroyables = this._getDestroyables();
|
|
795
|
+
|
|
796
|
+
var pRequire = new Promise(function(resolve, reject) {
|
|
797
|
+
sap.ui.require(["sap/ui/core/Fragment"], function(Fragment) {
|
|
798
|
+
resolve(Fragment);
|
|
799
|
+
}, reject);
|
|
800
|
+
}).then(function(Fragment) {
|
|
801
|
+
if (!mOptions.id && bAutoPrefixId) {
|
|
802
|
+
oFragmentOptions.id = this.getView().getId();
|
|
803
|
+
} else if (bAutoPrefixId) {
|
|
804
|
+
oFragmentOptions.id = this.createId(mOptions.id);
|
|
805
|
+
}
|
|
806
|
+
if (oOwnerComponent) {
|
|
807
|
+
return oOwnerComponent.runAsOwner(function() {
|
|
808
|
+
return Fragment.load(oFragmentOptions);
|
|
809
|
+
});
|
|
810
|
+
} else {
|
|
811
|
+
return Fragment.load(oFragmentOptions);
|
|
812
|
+
}
|
|
813
|
+
}.bind(this)).then(function(vContent) {
|
|
814
|
+
if (bAddToDependents) {
|
|
815
|
+
this.getView().applySettings({"dependents": vContent});
|
|
816
|
+
}
|
|
817
|
+
/* if already resolved remove from bookkeeping. App needs to destroy or it is
|
|
818
|
+
implicitly destroyed via the dependents (or other) aggregation */
|
|
819
|
+
aDestroyables.splice(aDestroyables.indexOf(pRequire),1);
|
|
820
|
+
return vContent;
|
|
821
|
+
}.bind(this));
|
|
822
|
+
aDestroyables.push(pRequire);
|
|
823
|
+
return pRequire;
|
|
824
|
+
};
|
|
687
825
|
|
|
688
826
|
/**
|
|
689
827
|
* Global extension provider name which will be used to create the
|
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
|
45
45
|
* @extends sap.ui.core.mvc.View
|
|
46
46
|
*
|
|
47
47
|
* @author SAP SE
|
|
48
|
-
* @version 1.
|
|
48
|
+
* @version 1.93.3
|
|
49
49
|
*
|
|
50
50
|
* @public
|
|
51
51
|
* @since 1.9.2
|
|
@@ -121,6 +121,8 @@ sap.ui.define([
|
|
|
121
121
|
/**
|
|
122
122
|
* Flag for feature detection of asynchronous loading/rendering
|
|
123
123
|
* @public
|
|
124
|
+
* @readonly
|
|
125
|
+
* @type {boolean}
|
|
124
126
|
* @since 1.30
|
|
125
127
|
*/
|
|
126
128
|
HTMLView.asyncSupport = true;
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @class
|
|
44
44
|
* A View defined using JSON.
|
|
45
45
|
* @extends sap.ui.core.mvc.View
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.93.3
|
|
47
47
|
*
|
|
48
48
|
* @public
|
|
49
49
|
* @alias sap.ui.core.mvc.JSONView
|
|
@@ -132,10 +132,12 @@ sap.ui.define([
|
|
|
132
132
|
JSONView._sType = ViewType.JSON;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
* Flag for feature detection of asynchronous loading/rendering.
|
|
136
|
+
* @public
|
|
137
|
+
* @readonly
|
|
138
|
+
* @type {boolean}
|
|
139
|
+
* @since 1.30
|
|
140
|
+
*/
|
|
139
141
|
JSONView.asyncSupport = true;
|
|
140
142
|
|
|
141
143
|
JSONView.prototype.initViewSettings = function(mSettings) {
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @param {object} [mSettings] initial settings for the new control
|
|
28
28
|
*
|
|
29
29
|
* @extends sap.ui.core.mvc.View
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.93.3
|
|
31
31
|
* @deprecated Since 1.90. Instead use {@link topic:e6bb33d076dc4f23be50c082c271b9f0 Typed Views}
|
|
32
32
|
* by defining the view class with {@link sap.ui.core.mvc.View.extend View.extend} and
|
|
33
33
|
* creating the view instances with {@link sap.ui.core.mvc.View.create View.create}.
|
|
@@ -62,8 +62,10 @@ sap.ui.define([
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* Flag for feature detection of asynchronous loading/rendering
|
|
65
|
+
* Flag for feature detection of asynchronous loading/rendering.
|
|
66
66
|
* @public
|
|
67
|
+
* @readonly
|
|
68
|
+
* @type {boolean}
|
|
67
69
|
* @since 1.30
|
|
68
70
|
*/
|
|
69
71
|
JSView.asyncSupport = true;
|
|
@@ -29,7 +29,7 @@ function(View, TemplateViewRenderer, ViewType, Log) {
|
|
|
29
29
|
* @extends sap.ui.core.mvc.View
|
|
30
30
|
*
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.93.3
|
|
33
33
|
*
|
|
34
34
|
* @public
|
|
35
35
|
* @deprecated Since version 1.56.0, use {@link sap.ui.core.mvc.XMLView} in combination with
|
|
@@ -140,7 +140,7 @@ sap.ui.define([
|
|
|
140
140
|
* The default implementation of this method returns <code>false</code>.
|
|
141
141
|
*
|
|
142
142
|
* @extends sap.ui.core.Control
|
|
143
|
-
* @version 1.
|
|
143
|
+
* @version 1.93.3
|
|
144
144
|
*
|
|
145
145
|
* @public
|
|
146
146
|
* @alias sap.ui.core.mvc.View
|
|
@@ -442,6 +442,7 @@ sap.ui.define([
|
|
|
442
442
|
bAsync = mSettings.async;
|
|
443
443
|
|
|
444
444
|
if (!oController && oThis.getControllerName) {
|
|
445
|
+
oThis.bControllerIsViewManaged = true;
|
|
445
446
|
// get optional default controller name
|
|
446
447
|
var defaultController = oThis.getControllerName();
|
|
447
448
|
if (defaultController) {
|
|
@@ -474,6 +475,7 @@ sap.ui.define([
|
|
|
474
475
|
}
|
|
475
476
|
}
|
|
476
477
|
} else if (oController) {
|
|
478
|
+
oThis.bControllerIsViewManaged = false;
|
|
477
479
|
// if passed controller is not extended yet we need to do it.
|
|
478
480
|
var sOwnerId = ManagedObject._sOwnerId;
|
|
479
481
|
if (!oController._isExtended()) {
|
|
@@ -742,7 +744,10 @@ sap.ui.define([
|
|
|
742
744
|
*/
|
|
743
745
|
View.prototype.exit = function() {
|
|
744
746
|
this.fireBeforeExit();
|
|
745
|
-
|
|
747
|
+
if (this.oController && this.bControllerIsViewManaged) {
|
|
748
|
+
this.oController.destroy();
|
|
749
|
+
delete this.oController;
|
|
750
|
+
}
|
|
746
751
|
delete this.oPreprocessorInfo;
|
|
747
752
|
if (this.oAsyncState) {
|
|
748
753
|
var fnDelete = deleteAsyncState.bind(this);
|
|
@@ -1114,6 +1119,7 @@ sap.ui.define([
|
|
|
1114
1119
|
* @private
|
|
1115
1120
|
* @ui5-restricted sap.ui.core
|
|
1116
1121
|
* @see {sap.ui.view}
|
|
1122
|
+
* @function
|
|
1117
1123
|
*/
|
|
1118
1124
|
View._create = viewFactory;
|
|
1119
1125
|
|
|
@@ -1274,6 +1280,9 @@ sap.ui.define([
|
|
|
1274
1280
|
|
|
1275
1281
|
// view creation
|
|
1276
1282
|
if (sViewClass) {
|
|
1283
|
+
if (oViewSettings.type) {
|
|
1284
|
+
Log.error("When using the view factory, the 'type' setting must be omitted for typed views. When embedding typed views in XML, don't use the <JSView> tag, use the <View> tag instead.");
|
|
1285
|
+
}
|
|
1277
1286
|
return sViewClass;
|
|
1278
1287
|
}
|
|
1279
1288
|
if (!oViewSettings.type) {
|
|
@@ -1448,17 +1457,19 @@ sap.ui.define([
|
|
|
1448
1457
|
};
|
|
1449
1458
|
|
|
1450
1459
|
return ManagedObject.runWithPreprocessors(function() {
|
|
1460
|
+
var vContent = this.createContent(oController);
|
|
1451
1461
|
if (mSettings.async) {
|
|
1452
|
-
|
|
1453
|
-
vContent = vContent instanceof Promise ? vContent : Promise.resolve(vContent);
|
|
1462
|
+
vContent = Promise.resolve(vContent);
|
|
1454
1463
|
return vContent.then(function(vContent) {
|
|
1455
1464
|
this.applySettings({
|
|
1456
1465
|
content : vContent
|
|
1457
1466
|
});
|
|
1458
1467
|
}.bind(this));
|
|
1468
|
+
} else if (vContent instanceof Promise) {
|
|
1469
|
+
throw new Error("An asynchronous view (createContent) cannot be instantiated synchronously. Affected view: '" + this.getMetadata().getName() + "'.");
|
|
1459
1470
|
} else {
|
|
1460
1471
|
this.applySettings({
|
|
1461
|
-
content :
|
|
1472
|
+
content : vContent
|
|
1462
1473
|
});
|
|
1463
1474
|
}
|
|
1464
1475
|
}.bind(this), mPreprocessorSettings);
|
|
@@ -11,6 +11,8 @@ sap.ui.define([], function () {
|
|
|
11
11
|
/**
|
|
12
12
|
* Specifies possible view types.
|
|
13
13
|
*
|
|
14
|
+
* <b>Note:</b> Typed views do not rely on a <code>ViewType</code>, it must be omitted in the view settings.
|
|
15
|
+
*
|
|
14
16
|
* @enum {string}
|
|
15
17
|
* @public
|
|
16
18
|
* @alias sap.ui.core.mvc.ViewType
|
|
@@ -96,7 +96,7 @@ sap.ui.define([
|
|
|
96
96
|
* control's dependents aggregation or add it by using {@link sap.ui.core.mvc.XMLView#addDependent}.
|
|
97
97
|
*
|
|
98
98
|
* @extends sap.ui.core.mvc.View
|
|
99
|
-
* @version 1.
|
|
99
|
+
* @version 1.93.3
|
|
100
100
|
*
|
|
101
101
|
* @public
|
|
102
102
|
* @alias sap.ui.core.mvc.XMLView
|
|
@@ -260,6 +260,8 @@ sap.ui.define([
|
|
|
260
260
|
/**
|
|
261
261
|
* Flag for feature detection of asynchronous loading/rendering
|
|
262
262
|
* @public
|
|
263
|
+
* @readonly
|
|
264
|
+
* @type {boolean}
|
|
263
265
|
* @since 1.30
|
|
264
266
|
*/
|
|
265
267
|
XMLView.asyncSupport = true;
|
|
@@ -350,15 +352,17 @@ sap.ui.define([
|
|
|
350
352
|
var Component = sap.ui.require("sap/ui/core/Component"),
|
|
351
353
|
oComponent;
|
|
352
354
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
355
|
+
if (Component) {
|
|
356
|
+
while (oSrcElement) {
|
|
357
|
+
var oCandidateComponent = Component.getOwnerComponentFor(oSrcElement);
|
|
358
|
+
if (oCandidateComponent) {
|
|
359
|
+
oSrcElement = oComponent = oCandidateComponent;
|
|
360
|
+
} else {
|
|
361
|
+
if (oSrcElement instanceof Component) {
|
|
362
|
+
oComponent = oSrcElement;
|
|
363
|
+
}
|
|
364
|
+
oSrcElement = oSrcElement.getParent && oSrcElement.getParent();
|
|
360
365
|
}
|
|
361
|
-
oSrcElement = oSrcElement.getParent && oSrcElement.getParent();
|
|
362
366
|
}
|
|
363
367
|
}
|
|
364
368
|
return oComponent;
|
|
@@ -7,9 +7,8 @@ sap.ui.define([
|
|
|
7
7
|
'sap/ui/core/library',
|
|
8
8
|
'./HashChanger',
|
|
9
9
|
"sap/base/Log",
|
|
10
|
-
"sap/base/util/ObjectPath"
|
|
11
|
-
|
|
12
|
-
], function(library, HashChanger, Log, ObjectPath, hasher) {
|
|
10
|
+
"sap/base/util/ObjectPath"
|
|
11
|
+
], function(library, HashChanger, Log, ObjectPath) {
|
|
13
12
|
"use strict";
|
|
14
13
|
|
|
15
14
|
// shortcut for enum(s)
|
|
@@ -32,27 +31,32 @@ sap.ui.define([
|
|
|
32
31
|
* @alias sap.ui.core.routing.History
|
|
33
32
|
*/
|
|
34
33
|
var History = function(oHashChanger) {
|
|
34
|
+
var that = this;
|
|
35
|
+
|
|
35
36
|
this._iHistoryLength = window.history.length;
|
|
36
37
|
this.aHistory = [];
|
|
37
38
|
this._bIsInitial = true;
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
function initHistory(sCurrentHash) {
|
|
41
|
+
if (History._bUsePushState && !History.getInstance()) {
|
|
42
|
+
var oState = window.history.state === null ? {} : window.history.state;
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
oState.sap = oState.sap ? oState.sap : {};
|
|
44
|
+
if (typeof oState === "object") {
|
|
45
|
+
oState.sap = oState.sap ? oState.sap : {};
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
if (oState.sap.history && Array.isArray(oState.sap.history) && oState.sap.history[oState.sap.history.length - 1] === sCurrentHash) {
|
|
48
|
+
History._aStateHistory = oState.sap.history;
|
|
49
|
+
} else {
|
|
50
|
+
History._aStateHistory.push(sCurrentHash);
|
|
51
|
+
oState.sap.history = History._aStateHistory;
|
|
52
|
+
window.history.replaceState(oState, window.document.title);
|
|
53
|
+
}
|
|
48
54
|
} else {
|
|
49
|
-
|
|
50
|
-
oState.sap.history = History._aStateHistory;
|
|
51
|
-
window.history.replaceState(oState, window.document.title);
|
|
55
|
+
Log.debug("Unable to determine HistoryDirection as history.state is already set: " + window.history.state, "sap.ui.core.routing.History");
|
|
52
56
|
}
|
|
53
|
-
} else {
|
|
54
|
-
Log.debug("Unable to determine HistoryDirection as history.state is already set: " + window.history.state, "sap.ui.core.routing.History");
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
that._reset();
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
if (!oHashChanger) {
|
|
@@ -61,7 +65,13 @@ sap.ui.define([
|
|
|
61
65
|
|
|
62
66
|
this._setHashChanger(oHashChanger);
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
if (oHashChanger._initialized) {
|
|
69
|
+
initHistory(oHashChanger.getHash());
|
|
70
|
+
} else {
|
|
71
|
+
oHashChanger.attachEventOnce("hashChanged", function(oEvent) {
|
|
72
|
+
initHistory(oEvent.getParameter("newHash"));
|
|
73
|
+
});
|
|
74
|
+
}
|
|
65
75
|
};
|
|
66
76
|
|
|
67
77
|
/**
|
|
@@ -234,7 +234,16 @@ sap.ui.define([
|
|
|
234
234
|
// suspend the dynamic targets
|
|
235
235
|
if (this._oConfig.dynamicTarget) {
|
|
236
236
|
this._oRouter._oTargets.suspend(this._oConfig.dynamicTarget);
|
|
237
|
-
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
_resume: function() {
|
|
242
|
+
if (this._oRouter._oTargets) {
|
|
243
|
+
this._oRouter._oTargets.resume(this._oConfig.target);
|
|
244
|
+
|
|
245
|
+
if (this._oConfig.dynamicTarget) {
|
|
246
|
+
this._oRouter._oTargets.resume(this._oConfig.dynamicTarget);
|
|
238
247
|
}
|
|
239
248
|
}
|
|
240
249
|
},
|
|
@@ -435,10 +435,14 @@ sap.ui.define([
|
|
|
435
435
|
// shouldn't be processed.
|
|
436
436
|
this.oHashChanger.attachEvent("hashChanged", this.fnHashChanged);
|
|
437
437
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
if (bIgnoreInitialHash) {
|
|
439
|
+
if (this._oMatchedRoute) {
|
|
440
|
+
this._oMatchedRoute._resume();
|
|
441
|
+
}
|
|
442
|
+
} else if (sHash !== RouterHashChanger.InvalidHash) {
|
|
443
|
+
// The HashChanger returns an InvalidHash when one of its ancestors is currently in
|
|
444
|
+
// the collect mode of preparing the next hash change. In this case, the Router should
|
|
445
|
+
// not parse the current hash and wait for the next 'hashChanged' event.
|
|
442
446
|
this.parse(sHash);
|
|
443
447
|
}
|
|
444
448
|
|
|
@@ -490,7 +494,6 @@ sap.ui.define([
|
|
|
490
494
|
|
|
491
495
|
if (this._oMatchedRoute) {
|
|
492
496
|
this._oMatchedRoute._routeSwitched();
|
|
493
|
-
this._oMatchedRoute = null;
|
|
494
497
|
}
|
|
495
498
|
|
|
496
499
|
this._bIsInitialized = false;
|
|
@@ -511,6 +511,32 @@ sap.ui.define([
|
|
|
511
511
|
return this;
|
|
512
512
|
},
|
|
513
513
|
|
|
514
|
+
/**
|
|
515
|
+
* Resumes the targets which are specified by the parameter
|
|
516
|
+
*
|
|
517
|
+
* @param {string|string[]|object|object[]} vTargets The key of the target
|
|
518
|
+
* or an object which has the key of the target under property 'name' as
|
|
519
|
+
* specified in the {@link #constructor}. To suspend multiple targets you
|
|
520
|
+
* may also pass an array of keys or objects which have the key saved
|
|
521
|
+
* under the 'name' property
|
|
522
|
+
* @return {sap.ui.core.routing.Targets} The 'this' for call chaining
|
|
523
|
+
* @private
|
|
524
|
+
*/
|
|
525
|
+
resume : function (vTargets) {
|
|
526
|
+
var aTargetsInfo = this._alignTargetsInfo(vTargets);
|
|
527
|
+
|
|
528
|
+
aTargetsInfo.forEach(function(oTargetInfo) {
|
|
529
|
+
var sTargetName = oTargetInfo.name;
|
|
530
|
+
var oTarget = this.getTarget(sTargetName);
|
|
531
|
+
|
|
532
|
+
if (oTarget) {
|
|
533
|
+
oTarget.resume();
|
|
534
|
+
}
|
|
535
|
+
}.bind(this));
|
|
536
|
+
|
|
537
|
+
return this;
|
|
538
|
+
},
|
|
539
|
+
|
|
514
540
|
/**
|
|
515
541
|
* Will be fired when a target is displayed.
|
|
516
542
|
*
|
|
@@ -35,12 +35,15 @@ sap.ui.define(["sap/base/Log", "sap/base/util/extend", "sap/ui/core/Component"],
|
|
|
35
35
|
oTargetData,
|
|
36
36
|
oCurrentPromise,
|
|
37
37
|
aAlignedTargets,
|
|
38
|
-
bRepeated =
|
|
38
|
+
bRepeated = (oRouter._oMatchedRoute === this);
|
|
39
39
|
|
|
40
40
|
oRouter._stopWaitingTitleChangedFromChild();
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
|
|
42
|
+
if (oRouter._oMatchedRoute) {
|
|
43
|
+
// clear the dynamicTarget of the previous matched route
|
|
44
|
+
delete oRouter._oMatchedRoute._oConfig.dynamicTarget;
|
|
43
45
|
}
|
|
46
|
+
|
|
44
47
|
oRouter._oMatchedRoute = this;
|
|
45
48
|
oRouter._bMatchingProcessStarted = true;
|
|
46
49
|
|