@sapui5/sap.suite.ui.generic.template 1.120.46 → 1.120.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt.properties +1 -1
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  5. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/ListReport/AnnotationHelperSmartList.js +1 -1
  7. package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +10 -8
  8. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +1 -1
  9. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -4
  11. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  12. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  14. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  15. package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +87 -67
  16. package/src/sap/suite/ui/generic/template/lib/TemplateAssembler.js +39 -40
  17. package/src/sap/suite/ui/generic/template/lib/ViewCreationHelper.js +39 -0
  18. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +4 -4
  19. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +1 -1
  20. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +35 -27
  21. package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.120.46",
3
+ "version": "1.120.48",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.120.46</version>
10
+ <version>1.120.48</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -55,7 +55,7 @@ VISUAL_FILTER_MEASURES=Medida por
55
55
 
56
56
  VISUAL_FILTER_CHART_TYPES=Tipos de gr\u00E1fico
57
57
 
58
- VISUAL_FILTER_CHART_TYPE_BAR=Gr\u00E1fico de barra
58
+ VISUAL_FILTER_CHART_TYPE_BAR=Gr\u00E1fico de barras
59
59
 
60
60
  VISUAL_FILTER_CHART_TYPE_Line=Gr\u00E1fico de linha
61
61
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.46"
11
+ "version": "1.120.48"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.46"
11
+ "version": "1.120.48"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -108,7 +108,7 @@ sap.ui.define([
108
108
  aCollection.sort(function (oFirstData, oSecondData) {
109
109
  var iFirstDataImportance = getImportance(oFirstData);
110
110
  var iSecondDataImportance = getImportance(oSecondData);
111
- return iFirstDataImportance < iSecondDataImportance ? -1 : 1;
111
+ return iFirstDataImportance < iSecondDataImportance ? -1 : iFirstDataImportance > iSecondDataImportance ? 1 : 0;
112
112
  });
113
113
  }
114
114
 
@@ -478,16 +478,15 @@ sap.ui.define([
478
478
  // setCurrentVariantId which triggers SFB's filterChange event. oDataLoadedWrapper
479
479
  // is attached to filterChange and resets bDataAreShownInTable to false — overwriting
480
480
  // the value that was correctly restored from iAppState. Re-applying it explicitly
481
- // after the microtask ensures the saved value wins after all synchronous activity
482
- // settles, without depending on the full SVM async promise chain which may not
483
- // resolve in test environments (OPA).
481
+ // after all wrapper promises settle ensures the saved value wins after all async
482
+ // activity completes (including SmartVariantManagementWrapper waiting for control
483
+ // initialization on cold start, e.g. tile click after browser refresh).
484
484
  var bDataLoaded = oAppData.controlStates && oAppData.controlStates["$dataLoaded"];
485
- fnAdaptOtherControlsToAppState(oAppData.controlStates);
486
- Promise.resolve().then(function() {
485
+ fnAdaptOtherControlsToAppState(oAppData.controlStates).then(function() {
487
486
  oDataLoadedWrapper.setState(bDataLoaded);
488
487
  if (areDataShownInTable() && Object.keys(oState.oSmartFilterbar.verifySearchAllowed()).length === 0) {
489
- // fnAdaptOtherControlsToAppState only (synchronously) sets the state including the information whether data should be loaded and search is allowed,- if this is the case, the actual loading
490
- // (which happens asynchronous of course) still needs to be triggered
488
+ // fnAdaptOtherControlsToAppState sets the state including the information whether data should be loaded and search is allowed.
489
+ // Now that all wrappers (including SVM) have finished applying state, trigger the actual data loading.
491
490
  loadData();
492
491
  } else {
493
492
  // hide placeholder already here, if no data is to be loaded - in case data is loaded, it will be hidden in data received event
@@ -817,12 +816,15 @@ sap.ui.define([
817
816
  }
818
817
 
819
818
  function fnAdaptOtherControlsToAppState(mControlsStates) {
819
+ var aPromises = [];
820
820
  // adapt controls according to current implementation
821
821
  // Information in state could actually differ (if state originates from old release, change in FE or app layer). Additional information in state should be ignored,
822
822
  // missing information should lead to set initial state (which wrappers should do if called with undefined)
823
823
  aControlStateWrappers.forEach(function (oWrapper) {
824
- oWrapper.setState(mControlsStates[oWrapper.getLocalId()]);
824
+ var vResult = oWrapper.setState(mControlsStates[oWrapper.getLocalId()]);
825
+ aPromises.push(Promise.resolve(vResult));
825
826
  });
827
+ return Promise.all(aPromises);
826
828
  }
827
829
 
828
830
  /**
@@ -66,7 +66,7 @@ CANCEL_AND_DISCARD=F\u00F6rkasta utkast?
66
66
 
67
67
  DISCARD_EDIT=F\u00F6rkasta alla \u00E4ndringar?
68
68
 
69
- DISCARD=F\u00F6rkasta
69
+ DISCARD=Kasta
70
70
 
71
71
  DELETE=Radera
72
72
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.46"
11
+ "version": "1.120.48"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -160,11 +160,11 @@ DELETE_SUCCESS_PLURAL_WITH_COUNT={0} Elemente wurden gel\u00F6scht.
160
160
 
161
161
  DELETE_SUCCESS_WITH_COUNT={0} Element wurde gel\u00F6scht.
162
162
 
163
- DELETE_ERROR_PLURAL_WITH_COUNT={0} El. k\u00F6nnen n. gel\u00F6scht werden
163
+ DELETE_ERROR_PLURAL_WITH_COUNT={0} Elemente k\u00F6nnen nicht gel\u00F6scht werden.
164
164
 
165
- DELETE_ERROR_WITH_COUNT={0} El. kann n. gel\u00F6scht werden
165
+ DELETE_ERROR_WITH_COUNT={0} Element kann nicht gel\u00F6scht werden.
166
166
 
167
- DELETE_ERROR=Ausg.El.kann n.gel\u00F6scht werd.
167
+ DELETE_ERROR=Das ausgew\u00E4hlte Element kann nicht gel\u00F6scht werden.
168
168
 
169
169
  DELETE_SUCCESS_PLURAL=Die ausgew\u00E4hlten Elemente wurden gel\u00F6scht.
170
170
 
@@ -172,7 +172,7 @@ ITEM_DELETED=Element gel\u00F6scht
172
172
 
173
173
  DELETE_UNDELETABLE_ITEMS={0} von {1} Elementen k\u00F6nnen nicht gel\u00F6scht werden.
174
174
 
175
- DELETE_UNDELETABLE_ITEM=Dieses Element kann nicht gel\u00F6scht werden
175
+ DELETE_UNDELETABLE_ITEM=Dieses Element kann nicht gel\u00F6scht werden.
176
176
 
177
177
  MESSAGE_GROUP_TABLE={0}, Tabelle\: {1}
178
178
 
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.46"
9
+ "version": "1.120.48"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.46"
9
+ "version": "1.120.48"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.46"
9
+ "version": "1.120.48"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -939,7 +939,7 @@ sap.ui.define([
939
939
  * @extends sap.ui.core.UIComponent
940
940
  * @abstract
941
941
  * @author SAP SE
942
- * @version 1.120.46
942
+ * @version 1.120.48
943
943
  * @name sap.suite.ui.generic.template.lib.AppComponent
944
944
  */
945
945
  return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -1,4 +1,5 @@
1
- sap.ui.define(["sap/ui/base/Object",
1
+ sap.ui.define([
2
+ "sap/ui/base/Object",
2
3
  "sap/ui/model/base/ManagedObjectModel",
3
4
  "sap/suite/ui/generic/template/genericUtilities/controlHelper",
4
5
  "sap/suite/ui/generic/template/genericUtilities/FeLogger",
@@ -9,8 +10,9 @@ sap.ui.define(["sap/ui/base/Object",
9
10
  "sap/base/util/isEmptyObject",
10
11
  "sap/suite/ui/generic/template/genericUtilities/FeError",
11
12
  "sap/base/util/UriParameters",
13
+ "sap/suite/ui/generic/template/lib/ViewCreationHelper",
12
14
  "sap/suite/ui/generic/template/lib/CommandComponentUtils"
13
- ], function(BaseObject, ManagedObjectModel, controlHelper, FeLogger, oDataModelHelper, CRUDActionHandler, StatePreserver, extend, isEmptyObject, FeError, UriParameters,
15
+ ], function(BaseObject, ManagedObjectModel, controlHelper, FeLogger, oDataModelHelper, CRUDActionHandler, StatePreserver, extend, isEmptyObject, FeError, UriParameters, ViewCreationHelper,
14
16
  CommandComponentUtils) {
15
17
  "use strict";
16
18
  var sClassName = "lib.ComponentUtils";
@@ -474,80 +476,98 @@ sap.ui.define(["sap/ui/base/Object",
474
476
  if (oComponentRegistryEntry.routingSpec && oComponentRegistryEntry.routingSpec.noOData){
475
477
  fnPageDataLoadedOnNavigation(null, bAreKeysDifferent);
476
478
  }
477
- return;
479
+ return Promise.resolve();
480
+ }
481
+ var oViewReadyPromise = Promise.resolve();
482
+ if (oComponentRegistryEntry.oController) {
483
+ var oView = oComponentRegistryEntry.oController.getView();
484
+ if (oView && oView.isDestroyed()) {
485
+ // View creation of a specific component use to happen only once in the lifecycle of the component.
486
+ // View is expected to be alive for the lifecycle of the template component. In some edge cases where
487
+ // the same application variant is used as a target application & the source application has Keep-Alive
488
+ // as true the source application, aggregated components & their corresponding views are not destroyed.
489
+ // When target application is started and component is being created FE checks for the view with ID & if
490
+ // exist it is destroyed. This means the Source App & component is active but its view will be destroyed.
491
+ // Now if user navigates back to the source application & opens the same view again. To handle this
492
+ // scenario, FE checks for such situation and re-creates the view here.
493
+ oViewReadyPromise = ViewCreationHelper.initializeViewCreation(oComponentRegistryEntry);
494
+ oComponent.onBeforeRendering(oComponentRegistryEntry);
495
+ }
478
496
  }
479
497
  var oComponentContainer = oComponent.getComponentContainer();
480
498
  if (!oComponentContainer){
481
- return;
499
+ return Promise.resolve();
482
500
  }
483
- var oUIModel = oComponent.getModel("ui");
484
- var bIsNonDraftCreate = !!oComponentRegistryEntry.nonDraftCreateContext;
485
- if (bIsNonDraftCreate) {
486
- var oBindingContext = oComponentContainer.getBindingContext();
487
- if (oBindingContext === oComponentRegistryEntry.nonDraftCreateContext){
488
- return; // page is already in correct state
489
- }
490
- oUIModel.setProperty("/enabled", true);
491
- oUIModel.setProperty("/editable", true);
492
- oUIModel.setProperty("/createMode", true);
493
- fnUnbind(); // unbind if bound to another context or an element binding
494
- if (fnHeaderDataAvailableResolve){
495
- fnHeaderDataAvailableResolve(oComponentRegistryEntry.nonDraftCreateContext);
496
- fnHeaderDataAvailableResolve = null;
501
+ return oViewReadyPromise.then(function() {
502
+ var oUIModel = oComponent.getModel("ui");
503
+ var bIsNonDraftCreate = !!oComponentRegistryEntry.nonDraftCreateContext;
504
+ if (bIsNonDraftCreate) {
505
+ var oBindingContext = oComponentContainer.getBindingContext();
506
+ if (oBindingContext === oComponentRegistryEntry.nonDraftCreateContext){
507
+ return; // page is already in correct state
508
+ }
509
+ oUIModel.setProperty("/enabled", true);
510
+ oUIModel.setProperty("/editable", true);
511
+ oUIModel.setProperty("/createMode", true);
512
+ fnUnbind(); // unbind if bound to another context or an element binding
513
+ if (fnHeaderDataAvailableResolve){
514
+ fnHeaderDataAvailableResolve(oComponentRegistryEntry.nonDraftCreateContext);
515
+ fnHeaderDataAvailableResolve = null;
516
+ } else {
517
+ oHeaderDataAvailablePromise = Promise.resolve(oComponentRegistryEntry.nonDraftCreateContext);
518
+ }
519
+ fnPreparePageDataLoaded();
520
+ if (oComponentRegistryEntry.methods.beforeRebind) {
521
+ oComponentRegistryEntry.methods.beforeRebind(oHeaderDataAvailablePromise);
522
+ }
523
+ oComponentContainer.setBindingContext(oComponentRegistryEntry.nonDraftCreateContext);
524
+ Promise.all([oComponentRegistryEntry.oViewRenderedPromise, oComponentRegistryEntry.viewRegistered]).then(fnCallPathUnchangedReuseCallbacks.bind(null, true, false));
525
+ if (oComponentRegistryEntry.methods.afterRebind) {
526
+ oComponentRegistryEntry.methods.afterRebind();
527
+ }
497
528
  } else {
498
- oHeaderDataAvailablePromise = Promise.resolve(oComponentRegistryEntry.nonDraftCreateContext);
499
- }
500
- fnPreparePageDataLoaded();
501
- if (oComponentRegistryEntry.methods.beforeRebind) {
502
- oComponentRegistryEntry.methods.beforeRebind(oHeaderDataAvailablePromise);
503
- }
504
- oComponentContainer.setBindingContext(oComponentRegistryEntry.nonDraftCreateContext);
505
- Promise.all([oComponentRegistryEntry.oViewRenderedPromise, oComponentRegistryEntry.viewRegistered]).then(fnCallPathUnchangedReuseCallbacks.bind(null, true, false));
506
- if (oComponentRegistryEntry.methods.afterRebind) {
507
- oComponentRegistryEntry.methods.afterRebind();
508
- }
509
- } else {
510
- var oElementBinding = oComponentContainer.getElementBinding();
511
- if (oElementBinding){
512
- if (sLogicalBindingPath === sBindingPath) {
513
- /*
514
- * component is already bound to this object - no rebound to avoid that 1:1, 1:N and expands are read
515
- * again
516
- */
517
- if (oElementBinding.isSuspended()) {
518
- oElementBinding.resume();
519
- fnAdaptToContext();
520
- }
521
- if (bIsDataLoading){
522
- fnStartBusy();
523
- }
524
- oComponentRegistryEntry.oApplication.getBusyHelper().getUnbusy().then(fnCallPathUnchangedReuseCallbacks.bind(null, bAreKeysDifferent, false));
525
- if (!bIsComponentCurrentlyActive){
526
- fnPreparePageDataLoaded();
527
- }
528
- if (!bIsComponentCurrentlyActive && !isDraftEnabled()){ // in non-draft case: even if this object has been left in edit mode we now return to display mode, since the changes have already been discarded
529
- var bEditFlowOfRoot = oComponentRegistryEntry.oApplication.getEditFlowOfRoot();
530
- if (bEditFlowOfRoot === "direct") {
531
- oUIModel.setProperty("/editable", true);
532
- } else {
533
- oUIModel.setProperty("/editable", false);
529
+ var oElementBinding = oComponentContainer.getElementBinding();
530
+ if (oElementBinding){
531
+ if (sLogicalBindingPath === sBindingPath) {
532
+ /*
533
+ * component is already bound to this object - no rebound to avoid that 1:1, 1:N and expands are read
534
+ * again
535
+ */
536
+ if (oElementBinding.isSuspended()) {
537
+ oElementBinding.resume();
538
+ fnAdaptToContext();
534
539
  }
540
+ if (bIsDataLoading){
541
+ fnStartBusy();
542
+ }
543
+ oComponentRegistryEntry.oApplication.getBusyHelper().getUnbusy().then(fnCallPathUnchangedReuseCallbacks.bind(null, bAreKeysDifferent, false));
544
+ if (!bIsComponentCurrentlyActive){
545
+ fnPreparePageDataLoaded();
546
+ }
547
+ if (!bIsComponentCurrentlyActive && !isDraftEnabled()){ // in non-draft case: even if this object has been left in edit mode we now return to display mode, since the changes have already been discarded
548
+ var bEditFlowOfRoot = oComponentRegistryEntry.oApplication.getEditFlowOfRoot();
549
+ if (bEditFlowOfRoot === "direct") {
550
+ oUIModel.setProperty("/editable", true);
551
+ } else {
552
+ oUIModel.setProperty("/editable", false);
553
+ }
554
+ }
555
+ oUIModel.setProperty("/enabled", true);
556
+ return;
557
+ } else if (!bIsComponentCurrentlyActive){
558
+ fnUnbind();
535
559
  }
536
- oUIModel.setProperty("/enabled", true);
537
- return;
538
- } else if (!bIsComponentCurrentlyActive){
539
- fnUnbind();
540
560
  }
561
+ // the following properties will be adapted by the change event of the binding
562
+ oUIModel.setProperty("/enabled", false);
563
+ oUIModel.setProperty("/editable", false);
564
+ oUIModel.setProperty("/createMode", false);
565
+ // and read the header data if necessary
566
+ fnRebindHeaderData(sBindingPath);
567
+
568
+ fnPreparePageDataLoaded();
541
569
  }
542
- // the following properties will be adapted by the change event of the binding
543
- oUIModel.setProperty("/enabled", false);
544
- oUIModel.setProperty("/editable", false);
545
- oUIModel.setProperty("/createMode", false);
546
- // and read the header data if necessary
547
- fnRebindHeaderData(sBindingPath);
548
-
549
- fnPreparePageDataLoaded();
550
- }
570
+ });
551
571
  }
552
572
 
553
573
  // This method can be called in two scenarios:
@@ -6,24 +6,43 @@
6
6
  // Note that this method cannot be used by any other class.
7
7
  // - getExtensionAPIPromise provides access to the instance of the extensionAPI suitable for a certain control
8
8
 
9
- sap.ui.define(["sap/ui/core/mvc/ControllerExtension",
10
- "sap/ui/core/mvc/OverrideExecution",
11
- "sap/ui/core/mvc/View",
12
- "sap/ui/model/base/ManagedObjectModel",
13
- "sap/suite/ui/generic/template/lib/TemplateViewController",
14
- "sap/suite/ui/generic/template/lib/TemplateComponent",
15
- "sap/suite/ui/generic/template/lib/CRUDManager",
16
- "sap/suite/ui/generic/template/lib/CommonUtils",
17
- "sap/suite/ui/generic/template/lib/ComponentUtils",
18
- "sap/suite/ui/generic/template/lib/CommonEventHandlers",
19
- "sap/suite/ui/generic/template/genericUtilities/testableHelper",
20
- "sap/suite/ui/generic/template/support/lib/CommonMethods",
21
- "sap/suite/ui/generic/template/genericUtilities/FeLogger",
22
- "sap/base/util/deepExtend",
23
- "sap/suite/ui/generic/template/lib/presentationControl/PresentationControlHandlerFactory",
24
- "sap/suite/ui/generic/template/lib/info/InfoObjectHandler"
25
- ], function(ControllerExtension, OverrideExecution, View, ManagedObjectModel, TemplateViewController, TemplateComponent, CRUDManager, CommonUtils,
26
- ComponentUtils, CommonEventHandlers, testableHelper, CommonMethods, FeLogger, deepExtend, PresentationControlHandlerFactory, InfoObjectHandler) {
9
+ sap.ui.define([
10
+ "sap/ui/core/mvc/ControllerExtension",
11
+ "sap/ui/core/mvc/OverrideExecution",
12
+ "sap/ui/core/mvc/View",
13
+ "sap/ui/model/base/ManagedObjectModel",
14
+ "sap/suite/ui/generic/template/lib/TemplateViewController",
15
+ "sap/suite/ui/generic/template/lib/TemplateComponent",
16
+ "sap/suite/ui/generic/template/lib/CRUDManager",
17
+ "sap/suite/ui/generic/template/lib/CommonUtils",
18
+ "sap/suite/ui/generic/template/lib/ComponentUtils",
19
+ "sap/suite/ui/generic/template/lib/CommonEventHandlers",
20
+ "sap/suite/ui/generic/template/genericUtilities/testableHelper",
21
+ "sap/suite/ui/generic/template/genericUtilities/FeLogger",
22
+ "sap/base/util/deepExtend",
23
+ "sap/suite/ui/generic/template/lib/presentationControl/PresentationControlHandlerFactory",
24
+ "sap/suite/ui/generic/template/lib/info/InfoObjectHandler",
25
+ "sap/m/IllustratedMessageType",
26
+ "sap/suite/ui/generic/template/lib/ViewCreationHelper"
27
+ ], function(
28
+ ControllerExtension,
29
+ OverrideExecution,
30
+ View,
31
+ ManagedObjectModel,
32
+ TemplateViewController,
33
+ TemplateComponent,
34
+ CRUDManager,
35
+ CommonUtils,
36
+ ComponentUtils,
37
+ CommonEventHandlers,
38
+ testableHelper,
39
+ FeLogger,
40
+ deepExtend,
41
+ PresentationControlHandlerFactory,
42
+ InfoObjectHandler,
43
+ IllustratedMessageType,
44
+ ViewCreationHelper
45
+ ) {
27
46
  "use strict";
28
47
  var oLogger = new FeLogger("lib.TemplateAssembler").getLogger();
29
48
 
@@ -376,28 +395,8 @@ sap.ui.define(["sap/ui/core/mvc/ControllerExtension",
376
395
  var oComponentRegistryEntry = oComponentData.registryEntry;
377
396
  var oAppRegistryEntry = getAppRegistryEntry(oComponentRegistryEntry.oAppComponent);
378
397
  var oTemplateContract = oAppRegistryEntry.oTemplateContract;
379
- var oTreeNode = oAppRegistryEntry.oTemplateContract.mRoutingTree[oComponentRegistryEntry.route];
380
- oComponentRegistryEntry.viewRegistered = new Promise(function(fnResolve, fnReject) {
381
- // Note: oError is faulty in regular situations
382
- oComponentRegistryEntry.fnViewRegisteredResolve = function(oError){
383
- if (oError){
384
- oComponentRegistryEntry.fnViewRegisteredResolve = Function.prototype;
385
- fnReject(oError);
386
- } else {
387
- delete oComponentRegistryEntry.fnViewRegisteredResolve;
388
- fnResolve();
389
- }
390
- };
391
- });
392
- oComponentRegistryEntry.oViewRenderedPromise = new Promise(function(fnResolve) {
393
- oComponentRegistryEntry.fnViewRenderdResolve = fnResolve;
394
- });
395
- oComponentRegistryEntry.oViewRenderedPromise.then(function () {
396
- // Application status needs to be handled here to support use cases where Diagnostics Tool gets loaded after the app itself.
397
- CommonMethods.setApplicationStatus(CommonMethods.mApplicationStatus.RENDERED);
398
- // When view rendering has finished, publish global event "GetData" at channel "elements".
399
- CommonMethods.publishEvent("elements", "ViewRendered", {});
400
- });
398
+ var oTreeNode = oAppRegistryEntry.oTemplateContract.mRoutingTree[oComponentRegistryEntry.route];
399
+ ViewCreationHelper.initializeViewCreation(oComponentRegistryEntry);
401
400
  oComponentRegistryEntry.componentName = sComponentNameFull;
402
401
  oComponentRegistryEntry.oComponent = this;
403
402
  oComponentRegistryEntry.aKeys = [];
@@ -0,0 +1,39 @@
1
+ sap.ui.define([
2
+ "sap/suite/ui/generic/template/support/lib/CommonMethods"
3
+ ], function(CommonMethods) {
4
+ "use strict";
5
+
6
+ // This class contain methods which plays role in view creation of Template Component.
7
+ return {
8
+ initializeViewCreation: function(oComponentRegistryEntry) {
9
+ // Set the creation view started flag to false, to indicate that the view creation has not started yet.
10
+ oComponentRegistryEntry.createViewStarted = false;
11
+
12
+ // Create a promise for the view registration. This promise will be resolved when the view is registered.
13
+ oComponentRegistryEntry.viewRegistered = new Promise(function(fnResolve, fnReject) {
14
+ // Note: oError is faulty in regular situations
15
+ oComponentRegistryEntry.fnViewRegisteredResolve = function(oError){
16
+ if (oError){
17
+ oComponentRegistryEntry.fnViewRegisteredResolve = Function.prototype;
18
+ fnReject(oError);
19
+ } else {
20
+ delete oComponentRegistryEntry.fnViewRegisteredResolve;
21
+ fnResolve();
22
+ }
23
+ };
24
+ });
25
+
26
+ // Create a promise for the view rendering. This promise will be resolved when the view is rendered.
27
+ oComponentRegistryEntry.oViewRenderedPromise = new Promise(function(fnResolve) {
28
+ oComponentRegistryEntry.fnViewRenderdResolve = fnResolve;
29
+ // Application status needs to be handled here to support use cases where Diagnostics Tool gets loaded after the app itself.
30
+ CommonMethods.setApplicationStatus(CommonMethods.mApplicationStatus.RENDERED);
31
+ // When view rendering has finished, publish global event "GetData" at channel "elements".
32
+ CommonMethods.publishEvent("elements", "ViewRendered", {});
33
+ });
34
+
35
+ // Returns view registered promise as the view creation is completed and process can continue.
36
+ return oComponentRegistryEntry.viewRegistered;
37
+ }
38
+ };
39
+ });
@@ -254,13 +254,13 @@ NEW_OBJECT=Nimet\u00F6n objekti
254
254
 
255
255
  NOITEMS_SMARTTABLE=Elem. ei k\u00E4ytett\u00E4viss\u00E4.
256
256
 
257
- NOITEMS_SMARTTABLE_WITH_FILTER=EiRivej\u00E4. YrMuutHakTaiSuodPar
257
+ NOITEMS_SMARTTABLE_WITH_FILTER=Ei elementtej\u00E4. Yrit\u00E4 mukauttaa haku- tai suodatusperusteita.
258
258
 
259
- NOITEMS_SMARTTABLE_WITH_FILTER_FOR_SEGMENTEDBUTTON=EiRivej\u00E4ValSuodPerJaTaulN\u00E4kVar
259
+ NOITEMS_SMARTTABLE_WITH_FILTER_FOR_SEGMENTEDBUTTON=Elementtej\u00E4 ei l\u00F6ytynyt valittujen suodatusperusteiden ja valitun taulukkon\u00E4kym\u00E4n osalta.
260
260
 
261
261
  NOITEMS_SMARTCHART=Tietoja ei l\u00F6ytynyt.
262
262
 
263
- NOITEMS_LR_SMARTCHART=Ei tietoja valitulla suodatinperusteella ja kaavion\u00E4kym\u00E4ll\u00E4.
263
+ NOITEMS_LR_SMARTCHART=Tietoja ei l\u00F6ytynyt valittujen suodatusperusteiden ja valitun kaavion\u00E4kym\u00E4n osalta.
264
264
 
265
265
  NOITEMS_SMARTCHART_WITH_FILTER=Tietoja ei l\u00F6ytynyt. Yrit\u00E4 s\u00E4\u00E4t\u00E4\u00E4 suodatusperusteita.
266
266
 
@@ -270,7 +270,7 @@ NOITEMS_LR_SMARTTABLE=Tietoja ei l\u00F6ytynyt.
270
270
 
271
271
  NOITEMS_LR_SMARTTABLE_WITH_FILTER=Ei tiet. Muuta haku-/suod.per.
272
272
 
273
- NOITEMS_MULTIVIEW_LR_SMARTTABLE_WITH_FILTER=EiTietValSuodPerJaTaulN\u00E4kVart
273
+ NOITEMS_MULTIVIEW_LR_SMARTTABLE_WITH_FILTER=Tietoja ei l\u00F6ytynyt valittujen suodatusperusteiden ja valitun taulukkon\u00E4kym\u00E4n osalta.
274
274
 
275
275
  ST_GENERIC_DELETE_WITH_WARNING_SUGGESTION_SINGULAR=Virhe\: poista objekti erikseen
276
276
 
@@ -176,7 +176,7 @@ ST_GENERIC_ERROR_NAVIGATION_PROPERTY_NOT_CORRECT=Lastnost navigacije {0} v pripo
176
176
 
177
177
  ST_GENERIC_FCL_FULLSCREEN=Celotni ekran
178
178
 
179
- ST_GENERIC_FCL_EXIT_FULLSCREEN=Izhod iz modusa celotnega ekrana
179
+ ST_GENERIC_FCL_EXIT_FULLSCREEN=Izhod iz celozaslonskega na\u010Dina
180
180
 
181
181
  ST_GENERIC_FCL_CLOSE_COLUMN=Zapri
182
182
 
@@ -2149,38 +2149,46 @@ sap.ui.define(["sap/ui/base/Object",
2149
2149
  oRegistryEntry.sCurrentBindingPath = sBindingPath;
2150
2150
  var fnActivate = function() {
2151
2151
  // Bind the model for the page itself and all its ancestors (up to level 1)
2152
- oRegistryEntry.utils.bindComponent(oRegistryEntry.sCurrentBindingPath, bIsComponentCurrentlyActive);
2153
- if (sComponentId === oCurrentIdentity.treeNode.componentId){
2154
- var mAncestors = Object.create(null); // Collect all ancestor routes
2155
- mAncestors.root = true;
2156
- for (var oTreeNode = oCurrentIdentity.treeNode; oTreeNode.level > 0; oTreeNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute]){
2157
- mAncestors[oTreeNode.sRouteName] = true;
2158
- oTreeNode.bindElement(oTemplateContract.oNavigationHost, null, true);
2159
- // Temporary solution (AncestorFeature)
2160
- if (oTreeNode.contextTargets){
2161
- for (var i = 0; i < oTreeNode.contextTargets.length; i++){
2162
- var oContextTarget = oTreeNode.contextTargets[i];
2163
- oTreeNode.bindElement(oContextTarget, null, false);
2152
+ var bindComponentPromise = oRegistryEntry.utils.bindComponent(oRegistryEntry.sCurrentBindingPath, bIsComponentCurrentlyActive);
2153
+ bindComponentPromise.then(function(){
2154
+ if (sComponentId === oCurrentIdentity.treeNode.componentId){
2155
+ var mAncestors = Object.create(null); // Collect all ancestor routes
2156
+ mAncestors.root = true;
2157
+ for (var oTreeNode = oCurrentIdentity.treeNode; oTreeNode.level > 0; oTreeNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute]){
2158
+ mAncestors[oTreeNode.sRouteName] = true;
2159
+ oTreeNode.bindElement(oTemplateContract.oNavigationHost, null, true);
2160
+ // Temporary solution (AncestorFeature)
2161
+ if (oTreeNode.contextTargets){
2162
+ for (var i = 0; i < oTreeNode.contextTargets.length; i++){
2163
+ var oContextTarget = oTreeNode.contextTargets[i];
2164
+ // Link control used for BreadCrumbs is bound to the context of the ancestor node as the description is fetched from
2165
+ // the ancestor object. Unfortunately, the OP where the link is on the OP & its context is propagated, even specific call
2166
+ // to set the context of ancestor node is not respected as the model find a context which is already bound. Hence, we need
2167
+ // to break the propagation of current object context before setting the context of ancestor node.
2168
+ oContextTarget.setBindingContext(null);
2169
+ oTreeNode.bindElement(oContextTarget, null, false);
2170
+ }
2164
2171
  }
2165
2172
  }
2166
- }
2167
- // Now we have done the binding of the tree node specific model for all ancestors of the current page.
2168
- // Unbind the tree node specific models for all other pages, as they might use outdated binding pathes.
2169
- for (var sRouteName in oTemplateContract.mRoutingTree) {
2170
- if (!mAncestors[sRouteName]) {
2171
- var oOtherTreeNode = oTemplateContract.mRoutingTree[sRouteName];
2172
- oOtherTreeNode.unbindElement(oTemplateContract.oNavigationHost, true);
2173
- // Temporary solution (AncestorFeature)
2174
- if (oOtherTreeNode.contextTargets) {
2175
- oOtherTreeNode.contextTargets.forEach(oOtherTreeNode.unbindElement);
2173
+ // Now we have done the binding of the tree node specific model for all ancestors of the current page.
2174
+ // Unbind the tree node specific models for all other pages, as they might use outdated binding pathes.
2175
+ for (var sRouteName in oTemplateContract.mRoutingTree) {
2176
+ if (!mAncestors[sRouteName]) {
2177
+ var oOtherTreeNode = oTemplateContract.mRoutingTree[sRouteName];
2178
+ oOtherTreeNode.unbindElement(oTemplateContract.oNavigationHost, true);
2179
+ // Temporary solution (AncestorFeature)
2180
+ if (oOtherTreeNode.contextTargets) {
2181
+ oOtherTreeNode.contextTargets.forEach(oOtherTreeNode.unbindElement);
2182
+ }
2176
2183
  }
2177
2184
  }
2178
2185
  }
2179
- }
2180
- oRegistryEntry.utils.refreshBinding();
2181
- oRegistryEntry.oStatePreserverPromise.then(function(oStatePreserver){
2182
- oStatePreserver.applyAppState(sBindingPath, bIsComponentCurrentlyActive);
2186
+ oRegistryEntry.utils.refreshBinding();
2187
+ oRegistryEntry.oStatePreserverPromise.then(function(oStatePreserver){
2188
+ oStatePreserver.applyAppState(sBindingPath, bIsComponentCurrentlyActive);
2189
+ });
2183
2190
  });
2191
+
2184
2192
  return (oRegistryEntry.methods.onActivate || Function.prototype)(sBindingPath, bIsComponentCurrentlyActive);
2185
2193
  };
2186
2194
  // If view is not registered yet ( == oComponentRegistryEntry.fnViewRegisteredResolve still available) perform fnActivate asyncronously, otherwise synchronosly
@@ -3094,7 +3102,7 @@ sap.ui.define(["sap/ui/base/Object",
3094
3102
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3095
3103
  * @public
3096
3104
  * @extends sap.ui.base.Object
3097
- * @version 1.120.46
3105
+ * @version 1.120.48
3098
3106
  * @since 1.30.0
3099
3107
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3100
3108
  */
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  interfaces: [],
61
61
  controls: [],
62
62
  elements: [],
63
- version: "1.120.46",
63
+ version: "1.120.48",
64
64
  extensions: {
65
65
  //Configuration used for rule loading of Support Assistant
66
66
  "sap.ui.support": {