@sapui5/sap.suite.ui.generic.template 1.148.1 → 1.149.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.
Files changed (119) 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/manifest.json +1 -1
  4. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  5. package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +254 -224
  6. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +1 -1
  7. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  8. package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +76 -33
  9. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ar.properties +4 -0
  10. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_bg.properties +4 -0
  11. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ca.properties +4 -0
  12. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +4 -0
  13. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cs.properties +4 -0
  14. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cy.properties +4 -0
  15. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_da.properties +4 -0
  16. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +6 -2
  17. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_el.properties +4 -0
  18. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +4 -0
  19. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_GB.properties +4 -0
  20. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es.properties +4 -0
  21. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es_MX.properties +4 -0
  22. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_et.properties +4 -0
  23. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fi.properties +4 -0
  24. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +4 -0
  25. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr_CA.properties +4 -0
  26. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hi.properties +4 -0
  27. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hr.properties +4 -0
  28. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hu.properties +4 -0
  29. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +5 -1
  30. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_it.properties +4 -0
  31. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_iw.properties +4 -0
  32. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ja.properties +4 -0
  33. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_kk.properties +4 -0
  34. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ko.properties +4 -0
  35. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lt.properties +4 -0
  36. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lv.properties +4 -0
  37. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +4 -0
  38. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ms.properties +4 -0
  39. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_nl.properties +4 -0
  40. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +4 -0
  41. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pl.properties +4 -0
  42. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +5 -1
  43. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt_PT.properties +4 -0
  44. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +4 -0
  45. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +4 -0
  46. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +4 -0
  47. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sk.properties +4 -0
  48. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +4 -0
  49. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +4 -0
  50. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +4 -0
  51. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_th.properties +4 -0
  52. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_tr.properties +4 -0
  53. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +5 -1
  54. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +4 -0
  55. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_CN.properties +4 -0
  56. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_TW.properties +4 -0
  57. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  58. package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +1 -0
  59. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  60. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  61. package/src/sap/suite/ui/generic/template/detailTemplates/DiscardEditHandler.js +9 -0
  62. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +43 -35
  63. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  64. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +9 -7
  65. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +0 -3
  66. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +6 -3
  67. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +1 -1
  68. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +1 -1
  69. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +9 -7
  70. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +9 -7
  71. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +9 -7
  72. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +9 -7
  73. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +9 -7
  74. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +9 -7
  75. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +9 -7
  76. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +13 -11
  77. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +9 -7
  78. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +9 -7
  79. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +9 -7
  80. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +9 -7
  81. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +9 -7
  82. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +9 -7
  83. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +9 -7
  84. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +9 -7
  85. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +10 -8
  86. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +10 -8
  87. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +9 -7
  88. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +9 -7
  89. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +9 -7
  90. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +9 -7
  91. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +9 -7
  92. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +9 -7
  93. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +9 -7
  94. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +9 -7
  95. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +9 -7
  96. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +9 -7
  97. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +9 -7
  98. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +9 -7
  99. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +9 -7
  100. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +9 -7
  101. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +9 -7
  102. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +9 -7
  103. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +9 -7
  104. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +9 -7
  105. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +9 -7
  106. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +9 -7
  107. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +9 -7
  108. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +9 -7
  109. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +9 -7
  110. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +9 -7
  111. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +9 -7
  112. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +9 -7
  113. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +9 -7
  114. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +9 -7
  115. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +9 -7
  116. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +9 -7
  117. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +9 -7
  118. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  119. package/src/sap/suite/ui/generic/template/library.js +1 -1
@@ -16,23 +16,23 @@ sap.ui.define([
16
16
  "sap/suite/ui/generic/template/genericUtilities/testableHelper",
17
17
  "sap/suite/ui/generic/template/js/StableIdHelper",
18
18
  "sap/suite/ui/generic/template/genericUtilities/utils"
19
- ], function(BaseObject, ControllerExtension, NavError, listUtils, SelectionVariant, UIState, FeLogger, deepEqual, extend,
20
- isEmptyObject, FeError, Device, semanticDateRangeTypeHelper, LegacyStateHandler, testableHelper, StableIdHelper, Utils) {
19
+ ], function (BaseObject, ControllerExtension, NavError, listUtils, SelectionVariant, UIState, FeLogger, deepEqual, extend,
20
+ isEmptyObject, FeError, Device, semanticDateRangeTypeHelper, LegacyStateHandler, testableHelper, StableIdHelper, Utils) {
21
21
  "use strict";
22
22
 
23
- var sClassName = "ListReport.controller.IappStateHandler";
23
+ var sClassName = "ListReport.controller.IappStateHandler";
24
24
  var oFeLogger = new FeLogger(sClassName);
25
25
  var oLogger = oFeLogger.getLogger();
26
26
  var oLevel = oFeLogger.Level;
27
27
  // Constants which are used as property names for storing custom filter data and generic filter data
28
28
  var dataPropertyNameCustom = "sap.suite.ui.generic.template.customData",
29
- dataPropertyNameExtension = "sap.suite.ui.generic.template.extensionData",
30
- dataPropertyNameGeneric = "sap.suite.ui.generic.template.genericData";
29
+ dataPropertyNameExtension = "sap.suite.ui.generic.template.extensionData",
30
+ dataPropertyNameGeneric = "sap.suite.ui.generic.template.genericData";
31
31
  // Array contains URL parameters that should be ignored and trigger app initialization as only
32
32
  // default parameters were passed
33
33
  var aIgnoreURLParameters = ["save-appvar-id"];
34
34
 
35
- function fnLogInfo(sMessage, vDetails){
35
+ function fnLogInfo(sMessage, vDetails) {
36
36
  if (sap.ui.support) { //only if support assistant is loaded
37
37
  var iLevel = oLogger.getLevel();
38
38
  if (iLevel < oLevel.INFO) {
@@ -40,12 +40,12 @@ sap.ui.define([
40
40
  }
41
41
  }
42
42
  var sDetails;
43
- if (typeof vDetails === "string"){
43
+ if (typeof vDetails === "string") {
44
44
  sDetails = vDetails;
45
45
  } else {
46
46
  sDetails = "";
47
47
  var sDelim = "";
48
- for (var sKey in vDetails){
48
+ for (var sKey in vDetails) {
49
49
  sDetails = sDetails + sDelim + sKey + ": " + vDetails[sKey];
50
50
  sDelim = "; ";
51
51
  }
@@ -60,13 +60,13 @@ sap.ui.define([
60
60
  // don't apply any results from appstate analysis to SFB before this event
61
61
  // -> should actually be handled by (wrapper for) SFB
62
62
  var onSmartFilterBarInitialized;
63
- var oSmartFilterBarInitializedPromise = new Promise(function(fnResolve){
63
+ var oSmartFilterBarInitializedPromise = new Promise(function (fnResolve) {
64
64
  onSmartFilterBarInitialized = fnResolve;
65
65
  });
66
66
 
67
67
  // Resolve this only after the FE initializes all the filter values from different sources
68
68
  var onFEStartupInitializedResolver;
69
- var onFEStartupInitializedPromise = new Promise(function(fnResolve) {
69
+ var onFEStartupInitializedPromise = new Promise(function (fnResolve) {
70
70
  onFEStartupInitializedResolver = fnResolve;
71
71
  });
72
72
  // *** setup wrappers for control states (start)
@@ -88,21 +88,27 @@ sap.ui.define([
88
88
  // storing/restoring their states (in its part of the appState stored in genericData.tableTabData)
89
89
  // In this case, mutliViewsHandler exchanges oState.oPresentationControlHandler (setting it always to the current visible one), so don't rely on that to get the wrapper.
90
90
  // Using the id (without providing optional parameter sQuickVariantKey) returns the smartTable only in single table case.
91
- var oSmartTable = oController.byId(StableIdHelper.getStableId({type: "ListReportTable", subType: "SmartTable"}));
92
- if (oSmartTable){ // in multipleViews case (with multiple tables) currently multipleViews handler handles complete state information
91
+ var oSmartTable = oController.byId(StableIdHelper.getStableId({
92
+ type: "ListReportTable",
93
+ subType: "SmartTable"
94
+ }));
95
+ if (oSmartTable) { // in multipleViews case (with multiple tables) currently multipleViews handler handles complete state information
93
96
  aControlStateWrappers.push(oTemplateUtils.oCommonUtils.getControlStateWrapper(oSmartTable));
94
97
  }
95
98
 
96
99
  // SearchField state: Value of searchfield
97
100
  // Exists only in case of worklist. In case of worklist with multiple views with multiple tables, same is true as for SmartTable
98
- var oSearchField = oController.byId(StableIdHelper.getStableId({type: "ListReportAction", subType: "SearchField"}));
99
- if (oSearchField){
101
+ var oSearchField = oController.byId(StableIdHelper.getStableId({
102
+ type: "ListReportAction",
103
+ subType: "SearchField"
104
+ }));
105
+ if (oSearchField) {
100
106
  aControlStateWrappers.push(oTemplateUtils.oCommonUtils.getControlStateWrapper(oSearchField));
101
107
  }
102
108
 
103
109
  var oMultipleViewsGeneralContentStateWrapper = oState.oMultipleViewsHandler.getGeneralContentStateWrapper();
104
- if (oMultipleViewsGeneralContentStateWrapper){
105
- oMultipleViewsGeneralContentStateWrapper.getLocalId = function(){
110
+ if (oMultipleViewsGeneralContentStateWrapper) {
111
+ oMultipleViewsGeneralContentStateWrapper.getLocalId = function () {
106
112
  return "$multipleViewsGeneralContent";
107
113
  };
108
114
  aControlStateWrappers.push(oMultipleViewsGeneralContentStateWrapper);
@@ -111,7 +117,7 @@ sap.ui.define([
111
117
  // state information not belonging to the SFB needs to be added to the variant management, if page variant management is used (setting smartVariantManagment) and not
112
118
  // hidden (setting variantManagementHidden) - otherwise, it needs to be stored directly in the appState
113
119
 
114
- if (oController.getOwnerComponent().getSmartVariantManagement() && !oController.getOwnerComponent().getVariantManagementHidden()){
120
+ if (oController.getOwnerComponent().getSmartVariantManagement() && !oController.getOwnerComponent().getVariantManagementHidden()) {
115
121
  // if no page variant management or page variant hidden, everything up to here is stored directly in the iAppState (only). In that case, only SFBs state is relevant for
116
122
  // variant managment
117
123
  aPageVariantControlStateWrappers = aControlStateWrappers;
@@ -119,8 +125,8 @@ sap.ui.define([
119
125
  }
120
126
 
121
127
  var oMultipleViewsSFBVariantContentStateWrapper = oState.oMultipleViewsHandler.getSFBVariantContentStateWrapper();
122
- if (oMultipleViewsSFBVariantContentStateWrapper){
123
- oMultipleViewsSFBVariantContentStateWrapper.getLocalId = function(){
128
+ if (oMultipleViewsSFBVariantContentStateWrapper) {
129
+ oMultipleViewsSFBVariantContentStateWrapper.getLocalId = function () {
124
130
  return "$multipleViewsSFBVariantContent";
125
131
  };
126
132
  aPageVariantControlStateWrappers.push(oMultipleViewsSFBVariantContentStateWrapper);
@@ -129,83 +135,86 @@ sap.ui.define([
129
135
  // List of handlers to react on (app or adaptation) extension state changes. Only one entry expected (handler in SFB wrapper). Currently, extensions are only possible in
130
136
  // SFB - if extensions at other places are needed, the similar handler might differ depending on whether page variant management is used.
131
137
  var aExtensionStateChangeHandlers = [];
138
+
132
139
  function customAppStateChange() {
133
- aExtensionStateChangeHandlers.forEach(function(fnHandler) {
140
+ aExtensionStateChangeHandlers.forEach(function (fnHandler) {
134
141
  fnHandler();
135
142
  });
136
143
  }
137
144
 
138
145
  var oCustomFiltersWrapper = {
139
- getLocalId: function(){
140
- return "$customFilters";
141
- },
142
- getState: function(){
143
- var oState = {
144
- appExtension: Object.create(null),
145
- adaptationExtensions: Object.create(null) // collects all extension state information (as map extension-namespace -> state). Initialized on demand
146
- };
147
-
148
- if (oTemplateUtils.oComponentUtils.isDraftEnabled()){
149
- var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
150
- oState.editState = oTemplatePrivateModel.getProperty("/listReport/vDraftState");
151
- }
152
-
153
- oController.getCustomAppStateDataExtension(oState.appExtension);
146
+ getLocalId: function () {
147
+ return "$customFilters";
148
+ },
149
+ getState: function () {
150
+ var oState = {
151
+ appExtension: Object.create(null),
152
+ adaptationExtensions: Object.create(null) // collects all extension state information (as map extension-namespace -> state). Initialized on demand
153
+ };
154
+
155
+ if (oTemplateUtils.oComponentUtils.isDraftEnabled()) {
156
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
157
+ oState.editState = oTemplatePrivateModel.getProperty("/listReport/vDraftState");
158
+ }
154
159
 
155
- var bIsAllowed = true; // check for synchronous calls
156
- // the following function will be passed to all extensions. It gives them the possibility to provide their state as oAppState
157
- // Therefore, they must identify themselves via their instance of ControllerExtension.
158
- var fnSetSingleAdaptationExtensionState = function(oControllerExtension, oSingleAdaptationExtensionState){
159
- if (!(oControllerExtension instanceof ControllerExtension)){
160
- throw new FeError(sClassName, "State must always be set with respect to a ControllerExtension");
161
- }
162
- if (!bIsAllowed){
163
- throw new FeError(sClassName, "State must always be provided synchronously");
164
- }
165
- oState.adaptationExtensions[oControllerExtension.getMetadata().getNamespace()] = oSingleAdaptationExtensionState;
166
- };
167
- oController.templateBaseExtension.provideExtensionAppStateData(fnSetSingleAdaptationExtensionState);
168
- bIsAllowed = false;
160
+ oController.getCustomAppStateDataExtension(oState.appExtension);
169
161
 
170
- return oState;
171
- },
172
- setState: function(oState){
173
- if (oTemplateUtils.oComponentUtils.isDraftEnabled()){
174
- var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
175
- oTemplatePrivateModel.setProperty("/listReport/vDraftState", oState.editState);
162
+ var bIsAllowed = true; // check for synchronous calls
163
+ // the following function will be passed to all extensions. It gives them the possibility to provide their state as oAppState
164
+ // Therefore, they must identify themselves via their instance of ControllerExtension.
165
+ var fnSetSingleAdaptationExtensionState = function (oControllerExtension, oSingleAdaptationExtensionState) {
166
+ if (!(oControllerExtension instanceof ControllerExtension)) {
167
+ throw new FeError(sClassName, "State must always be set with respect to a ControllerExtension");
176
168
  }
169
+ if (!bIsAllowed) {
170
+ throw new FeError(sClassName, "State must always be provided synchronously");
171
+ }
172
+ oState.adaptationExtensions[oControllerExtension.getMetadata().getNamespace()] = oSingleAdaptationExtensionState;
173
+ };
174
+ oController.templateBaseExtension.provideExtensionAppStateData(fnSetSingleAdaptationExtensionState);
175
+ bIsAllowed = false;
176
+
177
+ return oState;
178
+ },
179
+ setState: function (oState) {
180
+ if (oTemplateUtils.oComponentUtils.isDraftEnabled()) {
181
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
182
+ oTemplatePrivateModel.setProperty("/listReport/vDraftState", oState.editState);
183
+ }
177
184
 
178
- oController.restoreCustomAppStateDataExtension(oState.appExtension);
185
+ oController.restoreCustomAppStateDataExtension(oState.appExtension);
179
186
 
180
- var bIsAllowed = true; // check for synchronous calls
181
- // the following function will be passed to all extensions. It gives them the possibility to retrieve their state.
182
- // Therefore, they must identify themselves via their instance of ControllerExtension.
183
- var fnGetSingleAdaptationExtensionState = function(oControllerExtension){
184
- if (!(oControllerExtension instanceof ControllerExtension)){
185
- throw new FeError(sClassName, "State must always be retrieved with respect to a ControllerExtension");
186
- }
187
- if (!bIsAllowed){
188
- throw new FeError(sClassName, "State must always be restored synchronously");
189
- }
190
- return oState.adaptationExtensions[oControllerExtension.getMetadata().getNamespace()];
191
- };
192
- oController.templateBaseExtension.restoreExtensionAppStateData(fnGetSingleAdaptationExtensionState);
193
- bIsAllowed = false;
194
- },
195
- attachStateChanged: function(fnHandler){
196
- if (oController.byId("editStateFilter")){
197
- // Remark:
198
- // - checking for isDraftEnabled is not enough - if filtering on draft is not supported, editStateFilter would also not be created
199
- // - Cleaner from architectural point of view, but not strictly needed, as SFB registers for the same event and fires filterChanged
200
- oController.byId("editStateFilter").attachChange(fnHandler);
187
+ var bIsAllowed = true; // check for synchronous calls
188
+ // the following function will be passed to all extensions. It gives them the possibility to retrieve their state.
189
+ // Therefore, they must identify themselves via their instance of ControllerExtension.
190
+ var fnGetSingleAdaptationExtensionState = function (oControllerExtension) {
191
+ if (!(oControllerExtension instanceof ControllerExtension)) {
192
+ throw new FeError(sClassName, "State must always be retrieved with respect to a ControllerExtension");
193
+ }
194
+ if (!bIsAllowed) {
195
+ throw new FeError(sClassName, "State must always be restored synchronously");
201
196
  }
202
- // For extensionFilters, registration is needed for extension using controls not known to the SFB implementation (which is a fundamental purpose of extension!)
203
- // Same is valid for appExtensions and adaptationExtensions.
204
- aExtensionStateChangeHandlers.push(fnHandler);
197
+ return oState.adaptationExtensions[oControllerExtension.getMetadata().getNamespace()];
198
+ };
199
+ oController.templateBaseExtension.restoreExtensionAppStateData(fnGetSingleAdaptationExtensionState);
200
+ bIsAllowed = false;
201
+ },
202
+ attachStateChanged: function (fnHandler) {
203
+ if (oController.byId("editStateFilter")) {
204
+ // Remark:
205
+ // - checking for isDraftEnabled is not enough - if filtering on draft is not supported, editStateFilter would also not be created
206
+ // - Cleaner from architectural point of view, but not strictly needed, as SFB registers for the same event and fires filterChanged
207
+ oController.byId("editStateFilter").attachChange(fnHandler);
205
208
  }
209
+ // For extensionFilters, registration is needed for extension using controls not known to the SFB implementation (which is a fundamental purpose of extension!)
210
+ // Same is valid for appExtensions and adaptationExtensions.
211
+ aExtensionStateChangeHandlers.push(fnHandler);
212
+ }
206
213
  };
207
214
 
208
- var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapper(oState.oSmartFilterbar, {oCustomFiltersWrapper: oCustomFiltersWrapper});
215
+ var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapper(oState.oSmartFilterbar, {
216
+ oCustomFiltersWrapper: oCustomFiltersWrapper
217
+ });
209
218
 
210
219
  // theoretically, SFB's state is part of VM. But due to the direct connection between SFB and SVM, applying a variant would lead to an endless loop (selection variant as
211
220
  // part of UiState object applied to SFB also contains a variant id, which is then applied to SVM). The same connection ensures that the part of SFB's state known to the SFB
@@ -221,7 +230,7 @@ sap.ui.define([
221
230
  // SVM side (which is cleaner architecture, as the SVM rather manages the SFB)
222
231
  // - Here, only the connection is established. All workarounds needed due to the broken connection should be build into the wrappers
223
232
  var oSmartVariantManagement = oState.oSmartFilterbar.getSmartVariant();
224
- if (oSmartVariantManagement){
233
+ if (oSmartVariantManagement) {
225
234
  var oSmartVariantManagementWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapper(oSmartVariantManagement, {
226
235
  managedControlWrappers: aPageVariantControlStateWrappers.concat([oSmartFilterBarWrapper]),
227
236
  smartFilterBarWrapper: oSmartFilterBarWrapper
@@ -232,7 +241,10 @@ sap.ui.define([
232
241
  }
233
242
 
234
243
  // DynamicPage state: header pinned
235
- var oDynamicPage = oController.byId(StableIdHelper.getStableId({type: "ListReportPage", subType: "DynamicPage"}));
244
+ var oDynamicPage = oController.byId(StableIdHelper.getStableId({
245
+ type: "ListReportPage",
246
+ subType: "DynamicPage"
247
+ }));
236
248
  // The DynamicPage state (header pinned) is intentionally stored only in iAppState and not included in any variant (neither page variant nor SFB variant).
237
249
  var oDynamicPageWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapper(oDynamicPage);
238
250
  aControlStateWrappers.push(oDynamicPageWrapper);
@@ -240,7 +252,7 @@ sap.ui.define([
240
252
 
241
253
  // Wrapper to control whether data is loaded
242
254
 
243
- function fnGetDataLoadedWrapper(){
255
+ function fnGetDataLoadedWrapper() {
244
256
  // Wrapper to control whether data is expected to be loaded - controls the state, but does not trigger loading data on restore!
245
257
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
246
258
  // initial state:
@@ -248,16 +260,16 @@ sap.ui.define([
248
260
  // - other startup cases: applyInitialLoadBehavior calls setState explicitly
249
261
  // - navigation
250
262
 
251
- function fnSetState(bState){
263
+ function fnSetState(bState) {
252
264
  oTemplatePrivateModel.setProperty("/generic/bDataAreShownInTable", bState);
253
265
  }
254
266
 
255
- function fnGetState(){
267
+ function fnGetState() {
256
268
  return oTemplatePrivateModel.getProperty("/generic/bDataAreShownInTable");
257
269
  }
258
270
 
259
- function fnSetDataShown(bDataShown, fnHandler){
260
- if (bDataShown === fnGetState()){
271
+ function fnSetDataShown(bDataShown, fnHandler) {
272
+ if (bDataShown === fnGetState()) {
261
273
  return;
262
274
  }
263
275
  fnSetState(bDataShown);
@@ -265,12 +277,12 @@ sap.ui.define([
265
277
  }
266
278
 
267
279
  return {
268
- getLocalId: function(){
280
+ getLocalId: function () {
269
281
  return "$dataLoaded";
270
282
  },
271
283
  setState: fnSetState,
272
284
  getState: fnGetState,
273
- attachStateChanged: function(fnHandler){
285
+ attachStateChanged: function (fnHandler) {
274
286
  // changing from data not loaded to data loaded:
275
287
  // - when SFB triggers search
276
288
  oState.oSmartFilterbar.attachSearch(fnSetDataShown.bind(null, true, fnHandler));
@@ -282,6 +294,10 @@ sap.ui.define([
282
294
  // pro: - also for custom filters (the SFB does not know about)
283
295
  // - not when applying state to SFB
284
296
  // contra: could there be other changes from SFB?
297
+ // Note: this event also fires during iAppState restore when SVM applies a variant
298
+ // asynchronously via setCurrentVariantId, unintentionally resetting $dataLoaded
299
+ // to false. Therefore fnAdaptToAppStateIappState explicitly re-applies the saved
300
+ // $dataLoaded value after all wrappers have settled via Promise.all.
285
301
  oState.oSmartFilterbar.attachFilterChange(fnSetDataShown.bind(null, false, fnHandler));
286
302
  }
287
303
  };
@@ -289,10 +305,10 @@ sap.ui.define([
289
305
 
290
306
  var oDataLoadedWrapper = fnGetDataLoadedWrapper();
291
307
  aControlStateWrappers.push(oDataLoadedWrapper);
292
- // oDataLoadedWrapper.attachStateChanged(changeIappState);
308
+ // oDataLoadedWrapper.attachStateChanged(changeIappState);
293
309
 
294
310
  // attach to change event of all wrappers handled directly - others should be propagated through the managing control wrapper (currently a SmartVariantManagementWrapper)
295
- aControlStateWrappers.forEach(function(oWrapper){
311
+ aControlStateWrappers.forEach(function (oWrapper) {
296
312
  oWrapper.attachStateChanged(changeIappState);
297
313
  });
298
314
 
@@ -312,14 +328,14 @@ sap.ui.define([
312
328
  oDataLoadedWrapper.setState(bDataShown);
313
329
  }
314
330
 
315
- function areDataShownInTable(){
331
+ function areDataShownInTable() {
316
332
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
317
333
  return oTemplatePrivateModel.getProperty("/generic/bDataAreShownInTable");
318
334
  }
319
335
 
320
336
  // trigger loading data
321
337
  // This method is NOT intended to do any checks to analyze, whether loading data is actually needed - that should be done before
322
- function loadData(){
338
+ function loadData() {
323
339
  oState.oSmartFilterbar.search();
324
340
  }
325
341
 
@@ -327,8 +343,8 @@ sap.ui.define([
327
343
 
328
344
  var mControlStates = {},
329
345
  oUI5VersionInfo = oTemplateUtils.oComponentUtils.getUI5VersionInfo();
330
- aControlStateWrappers.forEach(function(oWrapper){
331
- if (oWrapper.getLocalId()){
346
+ aControlStateWrappers.forEach(function (oWrapper) {
347
+ if (oWrapper.getLocalId()) {
332
348
  mControlStates[oWrapper.getLocalId()] = oWrapper.getState();
333
349
  }
334
350
  });
@@ -358,13 +374,14 @@ sap.ui.define([
358
374
  }
359
375
  } else {
360
376
  var aPageVariantId = oNewUrlParameters['sap-ui-fe-variant-id'],
361
- aFilterBarVariantId = oNewUrlParameters['sap-ui-fe-filterbar-variant-id'],
362
- aChartVariantId = oNewUrlParameters['sap-ui-fe-chart-variant-id'],
363
- aTableVariantId = oNewUrlParameters['sap-ui-fe-table-variant-id'];
377
+ aFilterBarVariantId = oNewUrlParameters['sap-ui-fe-filterbar-variant-id'],
378
+ aChartVariantId = oNewUrlParameters['sap-ui-fe-chart-variant-id'],
379
+ aTableVariantId = oNewUrlParameters['sap-ui-fe-table-variant-id'];
364
380
 
365
381
  applyControlVariantId(aFilterBarVariantId && aFilterBarVariantId[0], aChartVariantId && aChartVariantId[0], aTableVariantId && aTableVariantId[0], aPageVariantId && aPageVariantId[0]);
366
382
  }
367
383
  }
384
+
368
385
  function applyControlVariantId(sFilterBarVariantId, sChartVariantId, sTableVariantId, sPageVariantId) {
369
386
  if (sFilterBarVariantId || sPageVariantId) {
370
387
  oSmartVariantManagement.setCurrentVariantId(sFilterBarVariantId || sPageVariantId);
@@ -388,7 +405,7 @@ sap.ui.define([
388
405
  // - Collapse of filter bar once user press Go (only for phone device)
389
406
  function onSearchPressed() {
390
407
  // if SFB does not allow search, no need to adapt anything
391
- if (!oState.oSmartFilterbar.checkSearchAllowed()){
408
+ if (!oState.oSmartFilterbar.checkSearchAllowed()) {
392
409
  return;
393
410
  }
394
411
  oState.refreshModel();
@@ -408,7 +425,7 @@ sap.ui.define([
408
425
 
409
426
  // It is responsible for:
410
427
  // - triggering the creation of a new appState
411
- function changeIappState(){
428
+ function changeIappState() {
412
429
  fnLogInfo("changeIappState called", {
413
430
  bDataAreShownInTable: areDataShownInTable()
414
431
  });
@@ -426,11 +443,11 @@ sap.ui.define([
426
443
  */
427
444
  function addDisplayCurrency(oAppData) {
428
445
  var aMandatoryFilterItems = oState.oSmartFilterbar.determineMandatoryFilterItems(),
429
- sDisplayCurrency;
446
+ sDisplayCurrency;
430
447
  for (var item = 0; item < aMandatoryFilterItems.length; item++) {
431
448
  if (aMandatoryFilterItems[item].getName().indexOf("P_DisplayCurrency") !== -1) {
432
- if (oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency") && oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency")[0]
433
- && oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency")[0].Low) {
449
+ if (oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency") && oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency")[0] &&
450
+ oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency")[0].Low) {
434
451
  sDisplayCurrency = oAppData.oDefaultedSelectionVariant.getSelectOption("DisplayCurrency")[0].Low;
435
452
  if (sDisplayCurrency) {
436
453
  oAppData.oSelectionVariant.addParameter("P_DisplayCurrency", sDisplayCurrency);
@@ -455,28 +472,36 @@ sap.ui.define([
455
472
  oState.oPresentationControlHandler.applyNavigationSortOrder(aNavigationSortOrder);
456
473
  }
457
474
 
458
- function fnAdaptToAppStateIappState(oAppData){
459
-
460
- fnAdaptOtherControlsToAppState(oAppData.controlStates);
461
- if (areDataShownInTable() && Object.keys(oState.oSmartFilterbar.verifySearchAllowed()).length === 0){
475
+ function fnAdaptToAppStateIappState(oAppData) {
476
+ // Save $dataLoaded value upfront before any wrappers run.
477
+ // This is needed because the SVM wrapper applies its variant asynchronously
478
+ // (via oAllControlsInitializedPromise). When it resolves, fnSetVariant calls
479
+ // setCurrentVariantId which triggers SFB's filterChange event. oDataLoadedWrapper
480
+ // is attached to filterChange and resets bDataAreShownInTable to false — overwriting
481
+ // the value that was correctly restored from iAppState. Re-applying it explicitly
482
+ // after Promise.all ensures the saved value wins after all async activity settles.
483
+ var bDataLoaded = oAppData.controlStates && oAppData.controlStates["$dataLoaded"];
484
+ fnAdaptOtherControlsToAppState(oAppData.controlStates).then(function() {
485
+ oDataLoadedWrapper.setState(bDataLoaded);
486
+ if (areDataShownInTable() && Object.keys(oState.oSmartFilterbar.verifySearchAllowed()).length === 0) {
462
487
  // 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
463
488
  // (which happens asynchronous of course) still needs to be triggered
464
489
  loadData();
465
- } else {
466
- // hide placeholder already here, if no data is to be loaded - in case data is loaded, it will be hidden in data received event
467
- oTemplateUtils.oComponentUtils.hidePlaceholder();
468
- }
469
-
470
- // special case: when restoring an old app state with data loaded, but in the meantime a filter not set in that state has been changed to mandatory, SFB.search would not
471
- // trigger a request (but instead only mark that filter) - thus hiding placeholder now to avoid it to stay forever
472
- // TODO: refactor: Still in that case our internal data shows data are loaded - ideally, that should not be the case
473
- if (!oState.oSmartFilterbar.checkSearchAllowed()){
474
- oTemplateUtils.oComponentUtils.hidePlaceholder();
475
- }
490
+ } else {
491
+ // hide placeholder already here, if no data is to be loaded - in case data is loaded, it will be hidden in data received event
492
+ oTemplateUtils.oComponentUtils.hidePlaceholder();
493
+ }
476
494
 
495
+ // special case: when restoring an old app state with data loaded, but in the meantime a filter not set in that state has been changed to mandatory, SFB.search would not
496
+ // trigger a request (but instead only mark that filter) - thus hiding placeholder now to avoid it to stay forever
497
+ // TODO: refactor: Still in that case our internal data shows data are loaded - ideally, that should not be the case
498
+ if (!oState.oSmartFilterbar.checkSearchAllowed()) {
499
+ oTemplateUtils.oComponentUtils.hidePlaceholder();
500
+ }
501
+ });
477
502
  }
478
503
 
479
- function fnAdaptToAppStateNavigation(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey){
504
+ function fnAdaptToAppStateNavigation(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey) {
480
505
  handleVariantIdPassedViaURLParams(oURLParameters);
481
506
  handleEditingStatusFilterPassedViaURLParams(oURLParameters);
482
507
  //Apply sort order coming from the XAppState to the smart table.
@@ -487,12 +512,12 @@ sap.ui.define([
487
512
  addDisplayCurrency(oAppData);
488
513
  }
489
514
  var oStartupObject = {
490
- viaExternalNavigation: true,
491
- selectionVariant: oAppData.oSelectionVariant,
492
- urlParameters: oURLParameters,
493
- selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
494
- // incase semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object
495
- semanticDates: (typeof oAppData.semanticDates === "string" ? JSON.parse(oAppData.semanticDates) : oAppData.semanticDates) || {}
515
+ viaExternalNavigation: true,
516
+ selectionVariant: oAppData.oSelectionVariant,
517
+ urlParameters: oURLParameters,
518
+ selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
519
+ // incase semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object
520
+ semanticDates: (typeof oAppData.semanticDates === "string" ? JSON.parse(oAppData.semanticDates) : oAppData.semanticDates) || {}
496
521
  };
497
522
  // if there is a navigation from external application to worklist,
498
523
  // the filters from external application should not be applied since the worklist does not show smartfilterbar
@@ -506,7 +531,7 @@ sap.ui.define([
506
531
  oStartupObject.semanticDates = semanticDateRangeTypeHelper.addSemanticDateRangeDefaultValue(oSettings, oState.oSmartFilterbar, oStartupObject.semanticDates, oStartupObject.urlParameters || {}, oStartupObject.selectionVariant, true);
507
532
  // Smart filter bar all the filters will be replaced by the one which are coming from oUiState build base of oSelectionVariant where the Semantic Date Default Values
508
533
  // is missing and because of that the values are replaced. Hence adding the semantic Dates to oSelectionVariant as mentioned by the Smart Control Colleague in the mentioned BCP
509
- oStartupObject.semanticDates.Dates.forEach(function(oSelectDateOption){
534
+ oStartupObject.semanticDates.Dates.forEach(function (oSelectDateOption) {
510
535
  oStartupObject.selectionVariant.addSelectOption(oSelectDateOption.PropertyName, "I", "EQ", "");
511
536
  });
512
537
  }
@@ -520,21 +545,21 @@ sap.ui.define([
520
545
 
521
546
  // In navigation case, data should be loaded in general unless variant is provided in navigation parameters - in that case, setting of that variant should win.
522
547
  // Remark: Implemented logic does not fully reflect this: If navigation parameter exists but points to the standard variant, still the initial startup logic applies.
523
- applyInitialLoadBehavior(/* bDataLoadCausedByNavigation = */ oState.oSmartFilterbar.isCurrentVariantStandard());
548
+ applyInitialLoadBehavior( /* bDataLoadCausedByNavigation = */ oState.oSmartFilterbar.isCurrentVariantStandard());
524
549
  }
525
550
 
526
551
 
527
- function fnAdaptToAppStateStartUpInitial(oURLParameters, sPreferredQuickVariantSelectionKey){
552
+ function fnAdaptToAppStateStartUpInitial(oURLParameters, sPreferredQuickVariantSelectionKey) {
528
553
  handleVariantIdPassedViaURLParams(oURLParameters);
529
554
 
530
555
  //oStartupObject to be passed to the extension where urlParameters and selectedQuickVariantSelectionKey are optional
531
556
  var oStartupObject = {
532
- viaExternalNavigation: false,
533
- selectionVariant: "",
534
- urlParameters: oURLParameters, // can only contain "technical" parameters (starting with "sap-")
535
- selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
536
- // in case semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object
537
- semanticDates: {}
557
+ viaExternalNavigation: false,
558
+ selectionVariant: "",
559
+ urlParameters: oURLParameters, // can only contain "technical" parameters (starting with "sap-")
560
+ selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
561
+ // in case semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object
562
+ semanticDates: {}
538
563
  };
539
564
  var oSFBUiState = oState.oSmartFilterbar.getUiState();
540
565
  var oSFBSelectionVariant = new SelectionVariant(JSON.stringify(oSFBUiState.getSelectionVariant()));
@@ -574,7 +599,7 @@ sap.ui.define([
574
599
 
575
600
  // Smart filter bar all the filters will be replaced by the one which are coming from oUiState build base of oSelectionVariant where the Semantic Date Default Values
576
601
  // is missing and because of that the values are replaced. Hence adding the semantic Dates to oSelectionVariant as mentioned by the Smart Control Colleague in the mentioned BCP
577
- oStartupObject.semanticDates.Dates.forEach(function(oSelectDateOption){
602
+ oStartupObject.semanticDates.Dates.forEach(function (oSelectDateOption) {
578
603
  oStartupObject.selectionVariant.addSelectOption(oSelectDateOption.PropertyName, "I", "EQ", "");
579
604
  });
580
605
  }
@@ -590,32 +615,32 @@ sap.ui.define([
590
615
  }
591
616
 
592
617
  //Startup semantic date will be priortised in case of collision
593
- function fnMergeSemanticDates(aSFBSemanticDate, aStartupSemanticDate){
618
+ function fnMergeSemanticDates(aSFBSemanticDate, aStartupSemanticDate) {
594
619
  var oSemanticDateMap = {};
595
- aSFBSemanticDate.forEach(function(oVal) {
620
+ aSFBSemanticDate.forEach(function (oVal) {
596
621
  oSemanticDateMap[oVal.PropertyName] = oVal;
597
622
  });
598
- aStartupSemanticDate.forEach(function(oVal) {
623
+ aStartupSemanticDate.forEach(function (oVal) {
599
624
  oSemanticDateMap[oVal.PropertyName] = oVal;
600
625
  });
601
626
  return Object.values(oSemanticDateMap);
602
627
  }
603
628
 
604
- function fnAdaptToAppStateStartUpWithParameters(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey){
629
+ function fnAdaptToAppStateStartUpWithParameters(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey) {
605
630
  handleVariantIdPassedViaURLParams(oURLParameters);
606
631
 
607
632
  var oSFBUiState = oState.oSmartFilterbar.getUiState();
608
633
  var oSFBSemanticDates = oSFBUiState.getSemanticDates();
609
634
  //oStartupObject to be passed to the extension where urlParameters and selectedQuickVariantSelectionKey are optional
610
635
  var oStartupObject = {
611
- viaExternalNavigation: false,
612
- selectionVariant: oAppData.oSelectionVariant,
613
- urlParameters: oURLParameters,
614
- selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
615
- // In case semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object.
616
- // Moreover, if there is no semanticDates retrieved from NavigationHandler, then the existing values of semantic
617
- // dates properties considered by smartfilterbar (from annotation, change handler etc) should be taken into consideration.
618
- semanticDates: (typeof oAppData.semanticDates === "string" ? JSON.parse(oAppData.semanticDates) : oAppData.semanticDates) || {}
636
+ viaExternalNavigation: false,
637
+ selectionVariant: oAppData.oSelectionVariant,
638
+ urlParameters: oURLParameters,
639
+ selectedQuickVariantSelectionKey: sPreferredQuickVariantSelectionKey,
640
+ // In case semantic date field is present, parseNavigation returns semanticDates in stringified format and otherwise an empty object.
641
+ // Moreover, if there is no semanticDates retrieved from NavigationHandler, then the existing values of semantic
642
+ // dates properties considered by smartfilterbar (from annotation, change handler etc) should be taken into consideration.
643
+ semanticDates: (typeof oAppData.semanticDates === "string" ? JSON.parse(oAppData.semanticDates) : oAppData.semanticDates) || {}
619
644
  };
620
645
  //Apply sort order coming from the XAppState to the smart table.
621
646
  if (oAppData.presentationVariant !== undefined) {
@@ -648,16 +673,16 @@ sap.ui.define([
648
673
  }
649
674
  // Smart filter bar all the filters will be replaced by the one which are coming from oUiState build base of oSelectionVariant where the Semantic Date Default Values
650
675
  // is missing and because of that the values are replaced. Hence adding the semantic Dates to oSelectionVariant as mentioned by the Smart Control Colleague in the mentioned BCP
651
- oStartupObject.semanticDates.Dates.forEach(function(oSelectDateOption) {
676
+ oStartupObject.semanticDates.Dates.forEach(function (oSelectDateOption) {
652
677
  var oSelectionDateOption = oStartupObject.selectionVariant.getSelectOption(oSelectDateOption.PropertyName);
653
- var oSFBSelectionOption = oSFBSelectionVariant.getSelectOption(oSelectDateOption.PropertyName);
678
+ var oSFBSelectionOption = oSFBSelectionVariant.getSelectOption(oSelectDateOption.PropertyName);
654
679
  //If startup object contains date range with the oSelectionDateOption PropertyName no need to override
655
680
  if (oSelectionDateOption && oSelectionDateOption.length != 0) {
656
681
  return;
657
682
  }
658
683
  //If SmartFilterBar has the property for that in that case add it to selectOption
659
684
  if (oSFBSelectionOption && oSFBSelectionOption.length != 0) {
660
- oStartupObject.selectionVariant.massAddSelectOption(oSelectDateOption.PropertyName,oSFBSelectionOption);
685
+ oStartupObject.selectionVariant.massAddSelectOption(oSelectDateOption.PropertyName, oSFBSelectionOption);
661
686
  return;
662
687
  }
663
688
  //If none has in that case we will add the selectOption with empty value
@@ -687,9 +712,9 @@ sap.ui.define([
687
712
 
688
713
  var oSFBSelectionVariantJSON = oSFBSelectionVariant.toJSONObject();
689
714
  if (
690
- !fnArrayContainsSameEnteries(oSFBSelectionVariantJSON.SelectOptions.filter(fnFilterItemExists), aTargetSelectionVariantJSON.SelectOptions.filter(fnFilterItemExists)) ||
691
- !fnArrayContainsSameEnteries(oSFBSelectionVariantJSON.Parameters.filter(fnParameterExists), aTargetSelectionVariantJSON.Parameters.filter(fnParameterExists)) ||
692
- !bSemanticDateEqual
715
+ !fnArrayContainsSameEnteries(oSFBSelectionVariantJSON.SelectOptions.filter(fnFilterItemExists), aTargetSelectionVariantJSON.SelectOptions.filter(fnFilterItemExists)) ||
716
+ !fnArrayContainsSameEnteries(oSFBSelectionVariantJSON.Parameters.filter(fnParameterExists), aTargetSelectionVariantJSON.Parameters.filter(fnParameterExists)) ||
717
+ !bSemanticDateEqual
693
718
  ) {
694
719
  fnApplySelectionVariantToSFB(oTargetSelectionVariant, oAppData.selectionVariant, true, oStartupObject.semanticDates, false);
695
720
  oSmartVariantManagement.currentVariantSetModified(true);
@@ -719,7 +744,7 @@ sap.ui.define([
719
744
  // In case of restoring from iAppState, it's called by applyState, which is in turn called from statePreserver, that
720
745
  // already takes care of not trying to apply an appstate that is not valid anymore.
721
746
  // task of this method is (now always when it's called!) only to adapt the state of all relevant controls to the provided one
722
- function fnAdaptToAppState(oAppData, oURLParameters, sNavType){
747
+ function fnAdaptToAppState(oAppData, oURLParameters, sNavType) {
723
748
  fnLogInfo("fnAdaptToAppState called", {
724
749
  sNavType: sNavType
725
750
  });
@@ -727,7 +752,7 @@ sap.ui.define([
727
752
  // Remark: within SVM Wrapper, setSuppressSelection is also used - be aware, that this must not be overlapping (as in both cases we set back to fixed-value false)
728
753
  oState.oSmartFilterbar.setSuppressSelection(false);
729
754
  bInitialisation = false;
730
- if (sNavType === sap.fe.navigation.NavType.hybrid){ // incase of hybrid -> take everything from IappState
755
+ if (sNavType === sap.fe.navigation.NavType.hybrid) { // incase of hybrid -> take everything from IappState
731
756
  oAppData = oAppData.iAppState;
732
757
  oAppData.controlStates = oAppData.data.permanentEntries.permanentState.data.controlStates;
733
758
  fnAdaptToAppStateIappState(oAppData);
@@ -737,7 +762,7 @@ sap.ui.define([
737
762
  // - restore from iAppState
738
763
  // - adapt to navigation parameters
739
764
  // - initial startup from scratch (including parameters provided from FLP!)
740
- if (sNavType === sap.fe.navigation.NavType.iAppState){ // first case is the simplest -> take everything from IappState
765
+ if (sNavType === sap.fe.navigation.NavType.iAppState) { // first case is the simplest -> take everything from IappState
741
766
  fnAdaptToAppStateIappState(oAppData);
742
767
  return;
743
768
  }
@@ -747,28 +772,28 @@ sap.ui.define([
747
772
  var sPreferredEntitySet = oSelectionInfo && oSelectionInfo.pageEntitySet;
748
773
  var sPreferredQuickVariantSelectionKey = oState.oMultipleViewsHandler.getPreferredKey(sPreferredEntitySet);
749
774
 
750
- switch (sNavType){
751
- case sap.fe.navigation.NavType.initial:
752
- // "technical" URL parameters are possible even in that case. NavigationHandler treats everything starting with "sap-" as technical.
753
- // some of them (at least 'sap-ui-fe*variant-id') are relevant
754
- fnAdaptToAppStateStartUpInitial(oURLParameters, sPreferredQuickVariantSelectionKey);
755
- break;
756
- case sap.fe.navigation.NavType.xAppState:
757
- case sap.fe.navigation.NavType.URLParams:
758
- if (oAppData.bNavSelVarHasDefaultsOnly
759
- || oAppData.oSelectionVariant.getSelectOptionsPropertyNames().length && Utils.isASubsetOfB(oAppData.oSelectionVariant.getSelectOptionsPropertyNames(), aIgnoreURLParameters)
760
- ){
761
- fnAdaptToAppStateStartUpWithParameters(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey);
762
- } else {
763
- fnAdaptToAppStateNavigation(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey);
764
- }
765
- break;
766
- default:
767
- throw new FeError(sClassName, "Invalid navigation type: " + sNavType);
775
+ switch (sNavType) {
776
+ case sap.fe.navigation.NavType.initial:
777
+ // "technical" URL parameters are possible even in that case. NavigationHandler treats everything starting with "sap-" as technical.
778
+ // some of them (at least 'sap-ui-fe*variant-id') are relevant
779
+ fnAdaptToAppStateStartUpInitial(oURLParameters, sPreferredQuickVariantSelectionKey);
780
+ break;
781
+ case sap.fe.navigation.NavType.xAppState:
782
+ case sap.fe.navigation.NavType.URLParams:
783
+ if (oAppData.bNavSelVarHasDefaultsOnly ||
784
+ oAppData.oSelectionVariant.getSelectOptionsPropertyNames().length && Utils.isASubsetOfB(oAppData.oSelectionVariant.getSelectOptionsPropertyNames(), aIgnoreURLParameters)
785
+ ) {
786
+ fnAdaptToAppStateStartUpWithParameters(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey);
787
+ } else {
788
+ fnAdaptToAppStateNavigation(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey);
789
+ }
790
+ break;
791
+ default:
792
+ throw new FeError(sClassName, "Invalid navigation type: " + sNavType);
768
793
  }
769
794
 
770
795
  // common to all startup cases (except iAppState)
771
- if (areDataShownInTable()){
796
+ if (areDataShownInTable()) {
772
797
  // trigger search if needed
773
798
  oState.oSmartFilterbar.search();
774
799
  // For desktop devices, expand the header for Standard and Custom variants and for tablet and mobile devices,
@@ -790,12 +815,15 @@ sap.ui.define([
790
815
  }
791
816
 
792
817
  function fnAdaptOtherControlsToAppState(mControlsStates) {
818
+ var aPromises = [];
793
819
  // adapt controls according to current implementation
794
820
  // 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,
795
821
  // missing information should lead to set initial state (which wrappers should do if called with undefined)
796
- aControlStateWrappers.forEach(function(oWrapper){
797
- oWrapper.setState(mControlsStates[oWrapper.getLocalId()]);
822
+ aControlStateWrappers.forEach(function (oWrapper) {
823
+ var vResult = oWrapper.setState(mControlsStates[oWrapper.getLocalId()]);
824
+ aPromises.push(Promise.resolve(vResult));
798
825
  });
826
+ return Promise.all(aPromises);
799
827
  }
800
828
 
801
829
  /**
@@ -804,7 +832,7 @@ sap.ui.define([
804
832
  * 2) State is an empty object: No state should be applied. It offers a flexibility to set the page to an initial state i.e. without any state.
805
833
  * 3) State is an object: Passed state should be applied and it should be transferred to the most current version, assuming overriding here will not harm.
806
834
  */
807
- function applyState(oState){
835
+ function applyState(oState) {
808
836
  if (!oState) {
809
837
  // no iAppState key in Url, that means
810
838
  // - we are definitely in startUp case (while navigating inside the app, there's always an appState - even if it cannot be stored)
@@ -812,7 +840,7 @@ sap.ui.define([
812
840
  // Remark: in case of an appState key in the URL, that could not be analyzed, we should NOT call navigationHandler to parse. In this case, we get an empty object
813
841
  // (in contrast to undefined when there's no appstate key)
814
842
 
815
- return oSmartFilterBarInitializedPromise.then(function() {
843
+ return oSmartFilterBarInitializedPromise.then(function () {
816
844
  var oStartupFinishedPromise = fnParseUrlAndApplyAppState();
817
845
  oStartupFinishedPromise.then(onFEStartupInitializedResolver);
818
846
  return oStartupFinishedPromise; // return promise to inform controller, when startup is finished
@@ -830,22 +858,22 @@ sap.ui.define([
830
858
  // enhance appData to the format needed by fnAdaptToAppState
831
859
  var oAppData = extend({
832
860
  oDefaultedSelectionVariant: new SelectionVariant(), // only accessed to check for P_DisplayCurrency - can this be relevant?
833
- oSelectionVariant: new SelectionVariant(oState && oState.selectionVariant) // -> oSelectionVariant
861
+ oSelectionVariant: new SelectionVariant(oState && oState.selectionVariant) // -> oSelectionVariant
834
862
  }, oState);
835
- oSmartFilterBarInitializedPromise.then(function(){
863
+ oSmartFilterBarInitializedPromise.then(function () {
836
864
  // fallback to navType initial, if appState is given in URL, but could not be analyzed => oState is an empty Object
837
- fnAdaptToAppState(oAppData, {} /* URLparameter are irrelevant if restoring from iAppState */, sNavType);
865
+ fnAdaptToAppState(oAppData, {} /* URLparameter are irrelevant if restoring from iAppState */ , sNavType);
838
866
  // Once the FE is initialized, the promise is resolved so that the SFB contains the updated list of filters
839
867
  onFEStartupInitializedResolver();
840
868
  });
841
869
  return oSmartFilterBarInitializedPromise; // to inform controller, when startup is finished
842
870
  }
843
871
 
844
- function fnParseUrlAndApplyAppState(){
845
- var oRet = new Promise(function(fnResolve){
872
+ function fnParseUrlAndApplyAppState() {
873
+ var oRet = new Promise(function (fnResolve) {
846
874
  try {
847
875
  var oParseNavigationPromise = oNavigationHandler.parseNavigation();
848
- oParseNavigationPromise.done(function(oAppData, oURLParameters, sNavType){
876
+ oParseNavigationPromise.done(function (oAppData, oURLParameters, sNavType) {
849
877
  if (sNavType !== sap.fe.navigation.NavType.iAppState) { // handled via state preserver
850
878
  // navType initial has also to be handled here, as in that case the call from state preserver happens to early (we don't even know
851
879
  // at that time, whether navtype is initial, URLparams or xAppState when started from FLP with user default values set)
@@ -853,16 +881,16 @@ sap.ui.define([
853
881
  }
854
882
  fnResolve();
855
883
  });
856
- oParseNavigationPromise.fail(function(oNavError, oURLParameters, sNavType){
884
+ oParseNavigationPromise.fail(function (oNavError, oURLParameters, sNavType) {
857
885
  /* Parsing app state has failed, so we cannot set the correct state
858
886
  * But at least we should get into a consistent state again, so the user can continue using the app
859
887
  */
860
888
  oLogger.warning(oNavError.getErrorCode() + "app state could not be parsed - continuing with empty state");
861
- // Use NavType initial, as this will enforce selection in case auto-binding is true.
889
+ // Use NavType initial, as this will enforce selection in case auto-binding is true.
862
890
  fnAdaptToAppState({}, oURLParameters, sap.fe.navigation.NavType.initial);
863
891
  fnResolve();
864
892
  });
865
- } catch (oError){
893
+ } catch (oError) {
866
894
  // method is called only, if no iAppState key in URL
867
895
  // possible error case could be a URL with xAppState key, but no iAppState key (navigation from non FE-app, or very old bookmark), and no ushell-Service available
868
896
  // TODO: verify, whether this can happen and how to deal with it
@@ -873,7 +901,7 @@ sap.ui.define([
873
901
  return oRet;
874
902
  }
875
903
 
876
- function fnRestoreExtendedFilterDataOnAfterSFBVariantLoad(oEvent){
904
+ function fnRestoreExtendedFilterDataOnAfterSFBVariantLoad(oEvent) {
877
905
  // Only difference in worklist: any change, i.e. also loading a variant, has to directly trigger a new request.
878
906
  // If we apply variant (as per appState), don't trigger search here, but later from appState restoring itself
879
907
  if (oState.oWorklistData.bWorkListEnabled && oEvent.getParameter("context") !== "SET_VM_ID") {
@@ -901,15 +929,15 @@ sap.ui.define([
901
929
  // should be controlled by VM (currently anything else we add to iAppState, but maybe that's only correct in case of page variant management)) we have to set it
902
930
  // (independent of the context).
903
931
  if (sap.ui.getCore().getMessageManager().getMessageModel().oData.length) {
904
- var removedMessages = [];
905
- for (var i in sap.ui.getCore().getMessageManager().getMessageModel().oData) {
906
- var msg = sap.ui.getCore().getMessageManager().getMessageModel().oData[i];
907
- if (msg.persistent && oEvent.getParameters().context === undefined) {
908
- removedMessages.push(msg);
909
- }
910
- }
911
- sap.ui.getCore().getMessageManager().removeMessages(removedMessages);
912
- }
932
+ var removedMessages = [];
933
+ for (var i in sap.ui.getCore().getMessageManager().getMessageModel().oData) {
934
+ var msg = sap.ui.getCore().getMessageManager().getMessageModel().oData[i];
935
+ if (msg.persistent && oEvent.getParameters().context === undefined) {
936
+ removedMessages.push(msg);
937
+ }
938
+ }
939
+ sap.ui.getCore().getMessageManager().removeMessages(removedMessages);
940
+ }
913
941
 
914
942
  // Restore header collapse logic (originally removed in change 5641712)
915
943
  // Collapse header when user manually selects a variant (context === undefined) that has executeOnSelect set to true
@@ -924,7 +952,7 @@ sap.ui.define([
924
952
  }
925
953
 
926
954
  // collapse dynamic header - conditions are checked at calling places
927
- function collapseHeader(){
955
+ function collapseHeader() {
928
956
  var oTemplatePrivateModel = oController.getOwnerComponent().getModel("_templPriv");
929
957
  // Remark: this property is never set to true programmatically - only if user expands the header explicitly via 2-way-binding
930
958
  oTemplatePrivateModel.setProperty("/listReport/isHeaderExpanded", false);
@@ -937,7 +965,7 @@ sap.ui.define([
937
965
  */
938
966
  function fnSetFiltersUsingUIState(oSelectionVariant, bReplace, bStrictMode, oSemanticDates) {
939
967
  var oUiState = new UIState({
940
- selectionVariant : oSelectionVariant,
968
+ selectionVariant: oSelectionVariant,
941
969
  semanticDates: oSemanticDates
942
970
  });
943
971
  oState.oSmartFilterbar.setUiState(oUiState, {
@@ -962,9 +990,9 @@ sap.ui.define([
962
990
  */
963
991
  function applySelectionProperties(oSelectionVariant, sSelectionVariant, bNavTypeInitial) {
964
992
  // even when the nav type is initial, due to modifystartup extension,new fields can be added to smartfilterbar
965
- if (oSelectionVariant && (sSelectionVariant !== "" || bNavTypeInitial)){
993
+ if (oSelectionVariant && (sSelectionVariant !== "" || bNavTypeInitial)) {
966
994
  var aSelectionVariantProperties = oSelectionVariant.getParameterNames().concat(
967
- oSelectionVariant.getSelectOptionsPropertyNames());
995
+ oSelectionVariant.getSelectOptionsPropertyNames());
968
996
  for (var i = 0; i < aSelectionVariantProperties.length; i++) {
969
997
  oState.oSmartFilterbar.addFieldToAdvancedArea(aSelectionVariantProperties[i]);
970
998
  }
@@ -972,24 +1000,24 @@ sap.ui.define([
972
1000
  }
973
1001
 
974
1002
  // map property values for property with name sFirstProperty to values for property with name sSecondProperty in oSelectionVariant
975
- function fnAlignSelectOptions(oSelectionVariant, sFirstProperty, sSecondProperty){
976
- if (oSelectionVariant.getParameter(sFirstProperty) && !oSelectionVariant.getParameter(sSecondProperty)){
1003
+ function fnAlignSelectOptions(oSelectionVariant, sFirstProperty, sSecondProperty) {
1004
+ if (oSelectionVariant.getParameter(sFirstProperty) && !oSelectionVariant.getParameter(sSecondProperty)) {
977
1005
  oSelectionVariant.addParameter(sSecondProperty, oSelectionVariant.getParameter(sFirstProperty));
978
1006
  }
979
- if (oSelectionVariant.getSelectOption(sFirstProperty) && !oSelectionVariant.getSelectOption(sSecondProperty)){
1007
+ if (oSelectionVariant.getSelectOption(sFirstProperty) && !oSelectionVariant.getSelectOption(sSecondProperty)) {
980
1008
  var aSelectOption = oSelectionVariant.getSelectOption(sFirstProperty);
981
- aSelectOption.forEach(function(oSelectOption){
1009
+ aSelectOption.forEach(function (oSelectOption) {
982
1010
  oSelectionVariant.addSelectOption(sSecondProperty, oSelectOption.Sign, oSelectOption.Option, oSelectOption.Low, oSelectOption.High);
983
1011
  });
984
1012
  }
985
1013
  }
986
1014
 
987
- function fnMapEditableFieldFor(oSelectionVariant){
1015
+ function fnMapEditableFieldFor(oSelectionVariant) {
988
1016
  var oMetaModel = oController.getOwnerComponent().getModel().getMetaModel();
989
1017
  var sEntitySet = oController.getOwnerComponent().getEntitySet();
990
1018
  var oEntityType = oMetaModel.getODataEntityType(oMetaModel.getODataEntitySet(sEntitySet).entityType);
991
- oEntityType.property.forEach(function(oProperty){
992
- if (oProperty["com.sap.vocabularies.Common.v1.EditableFieldFor"]){
1019
+ oEntityType.property.forEach(function (oProperty) {
1020
+ if (oProperty["com.sap.vocabularies.Common.v1.EditableFieldFor"]) {
993
1021
  // annotation property names follow their type, so PropertyPath is the right property to look at - String has to be supported for compatibility reasons
994
1022
  var sKeyProperty = oProperty["com.sap.vocabularies.Common.v1.EditableFieldFor"].PropertyPath || oProperty["com.sap.vocabularies.Common.v1.EditableFieldFor"].String;
995
1023
  var sForEditProperty = oProperty.name;
@@ -1001,7 +1029,7 @@ sap.ui.define([
1001
1029
  });
1002
1030
  }
1003
1031
 
1004
- function fnApplySelectionVariantToSFB(oSelectionVariant, sSelectionVariant, bReplace, oSemanticDates, bNavTypeInitial){
1032
+ function fnApplySelectionVariantToSFB(oSelectionVariant, sSelectionVariant, bReplace, oSemanticDates, bNavTypeInitial) {
1005
1033
  fnMapEditableFieldFor(oSelectionVariant);
1006
1034
  if (bReplace) {
1007
1035
  oState.oSmartFilterbar.clearVariantSelection();
@@ -1013,15 +1041,17 @@ sap.ui.define([
1013
1041
  // provide data load settings including defaulting
1014
1042
  // ideally, this should be implemented in a generic way in template assembler, so that generated getters also return default values for objects if not explicitely set in
1015
1043
  // manifest (i.e. it should be sufficient to define the default in component - no need to individually implement defaulting!)
1016
- function getDataLoadSettings(){
1044
+ function getDataLoadSettings() {
1017
1045
  // general default
1018
- var oDefaultDataLoadSettings = {loadDataOnAppLaunch: "ifAnyFilterExist"};
1046
+ var oDefaultDataLoadSettings = {
1047
+ loadDataOnAppLaunch: "ifAnyFilterExist"
1048
+ };
1019
1049
 
1020
1050
  // intension is boolean, but unfortunately faulty values are (historically) not treated consistently
1021
1051
  var bEnableAutoBindingMultiViews = oState.oMultipleViewsHandler.getOriginalEnableAutoBinding();
1022
1052
 
1023
1053
  // if multiple views settings is not defined (also the case in single views case), general default is taken. Unlike other faulty values, null is treated like undefined
1024
- if (bEnableAutoBindingMultiViews !== undefined && bEnableAutoBindingMultiViews !== null){
1054
+ if (bEnableAutoBindingMultiViews !== undefined && bEnableAutoBindingMultiViews !== null) {
1025
1055
  // multiple views setting overrules general default
1026
1056
  oDefaultDataLoadSettings.loadDataOnAppLaunch = bEnableAutoBindingMultiViews ? "always" : "never";
1027
1057
  }
@@ -1031,7 +1061,7 @@ sap.ui.define([
1031
1061
  // settings. Other not allowed values (any other sting) were ignored, i.e. returning undefined from getInitialLoadBehaviourSettings, thus setting undefined to
1032
1062
  // oSmartVariantManagement.setExecuteOnStandard (which actually only sets the default) and finally using the value returned from
1033
1063
  // oSmartVariantManagement.getExecuteOnStandard (only different from overall default (false), if user has explicitly set it)
1034
- if (oManifestDataLoadSettings && oManifestDataLoadSettings.loadDataOnAppLaunch === ""){
1064
+ if (oManifestDataLoadSettings && oManifestDataLoadSettings.loadDataOnAppLaunch === "") {
1035
1065
  oManifestDataLoadSettings.loadDataOnAppLaunch = undefined;
1036
1066
  }
1037
1067
 
@@ -1042,16 +1072,16 @@ sap.ui.define([
1042
1072
  // analyze all input determining whether data should be loaded initially and accordingly
1043
1073
  // - sets default value for flag whether standard variant should be execute on select
1044
1074
  // - determines whether we actually should load data
1045
- function applyInitialLoadBehavior(bDataLoadCausedByNavigation){
1075
+ function applyInitialLoadBehavior(bDataLoadCausedByNavigation) {
1046
1076
  // cases definitely determining to load data initially
1047
1077
  // - worklist
1048
1078
  // - livemode
1049
1079
  // - master detail (i.e. bLoadListAndFirstEntryOnStartup is set)
1050
1080
  var oSmartFilterbar = oState.oSmartFilterbar;
1051
- var bShouldDataBeLoaded = oState.oWorklistData.bWorkListEnabled || oSmartFilterbar.getLiveMode() || oState.bLoadListAndFirstEntryOnStartup ;
1081
+ var bShouldDataBeLoaded = oState.oWorklistData.bWorkListEnabled || oSmartFilterbar.getLiveMode() || oState.bLoadListAndFirstEntryOnStartup;
1052
1082
 
1053
1083
  var sLoadBehaviour = getDataLoadSettings().loadDataOnAppLaunch;
1054
- if (!oSmartVariantManagement || oController.getOwnerComponent().getVariantManagementHidden()){
1084
+ if (!oSmartVariantManagement || oController.getOwnerComponent().getVariantManagementHidden()) {
1055
1085
  // No VM ->
1056
1086
  bShouldDataBeLoaded = bShouldDataBeLoaded || sLoadBehaviour === "always";
1057
1087
  bShouldDataBeLoaded = bShouldDataBeLoaded || (sLoadBehaviour === "ifAnyFilterExist" && oSmartFilterbar.getFiltersWithValues().length > 0);
@@ -1070,9 +1100,9 @@ sap.ui.define([
1070
1100
  oSmartVariantManagement && oSmartVariantManagement.setExecuteOnStandard(bDefaultExecuteOnStandard);
1071
1101
 
1072
1102
  // determine final setting according to user's variant settings
1073
- if (oState.oSmartFilterbar.isCurrentVariantStandard()){
1103
+ if (oState.oSmartFilterbar.isCurrentVariantStandard()) {
1074
1104
  var bExecuteOnStandard = oSmartVariantManagement.getExecuteOnStandard();
1075
- if (bDefaultExecuteOnStandard !== bExecuteOnStandard){
1105
+ if (bDefaultExecuteOnStandard !== bExecuteOnStandard) {
1076
1106
  // user has overruled setting, so user's choice wins
1077
1107
  bShouldDataBeLoaded = bExecuteOnStandard;
1078
1108
  } else {
@@ -1098,7 +1128,7 @@ sap.ui.define([
1098
1128
  oDataLoadedWrapper.setState(!!bShouldDataBeLoaded);
1099
1129
  }
1100
1130
 
1101
- function onFEStartupInitialized(){
1131
+ function onFEStartupInitialized() {
1102
1132
  return onFEStartupInitializedPromise;
1103
1133
  }
1104
1134
 
@@ -1112,13 +1142,13 @@ sap.ui.define([
1112
1142
  onAfterSFBVariantLoad: onAfterSFBVariantLoad,
1113
1143
  applyState: applyState,
1114
1144
  getCurrentAppState: getCurrentAppState, // separation of concerns - only provide state, statePreserver responsible for storing it
1115
- setFiltersUsingUIState : fnSetFiltersUsingUIState,
1116
- onFEStartupInitialized : onFEStartupInitialized
1145
+ setFiltersUsingUIState: fnSetFiltersUsingUIState,
1146
+ onFEStartupInitialized: onFEStartupInitialized
1117
1147
  };
1118
1148
  }
1119
1149
 
1120
1150
  return BaseObject.extend("sap.suite.ui.generic.template.ListReport.controller.IappStateHandler", {
1121
- constructor: function(oState, oController, oTemplateUtils) {
1151
+ constructor: function (oState, oController, oTemplateUtils) {
1122
1152
  extend(this, getMethods(oState, oController, oTemplateUtils));
1123
1153
  }
1124
1154
  });