@sapui5/sap.fe.core 1.90.0 → 1.90.4

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 (60) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AnnotationHelper.js +1 -1
  4. package/src/sap/fe/core/AppComponent.js +1 -1
  5. package/src/sap/fe/core/AppStateHandler.js +1 -1
  6. package/src/sap/fe/core/BaseController.js +1 -1
  7. package/src/sap/fe/core/BusyLocker.js +1 -1
  8. package/src/sap/fe/core/CommonUtils.js +6 -2
  9. package/src/sap/fe/core/PageController.js +1 -1
  10. package/src/sap/fe/core/RouterProxy.js +1 -1
  11. package/src/sap/fe/core/Synchronization.js +1 -1
  12. package/src/sap/fe/core/TemplateComponent.js +1 -1
  13. package/src/sap/fe/core/TemplateModel.js +1 -1
  14. package/src/sap/fe/core/TransactionHelper.js +1 -1
  15. package/src/sap/fe/core/actions/draft.js +19 -13
  16. package/src/sap/fe/core/actions/messageHandling.js +73 -20
  17. package/src/sap/fe/core/actions/nonDraft.js +1 -1
  18. package/src/sap/fe/core/actions/operations.js +11 -11
  19. package/src/sap/fe/core/actions/sticky.js +1 -1
  20. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +1 -1
  21. package/src/sap/fe/core/controllerextensions/EditFlow.js +19 -10
  22. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
  23. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +9 -1
  24. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +1 -1
  25. package/src/sap/fe/core/controllerextensions/InternalRouting.js +1 -1
  26. package/src/sap/fe/core/controllerextensions/MessageHandler.js +12 -2
  27. package/src/sap/fe/core/controllerextensions/Placeholder.js +1 -1
  28. package/src/sap/fe/core/controllerextensions/Routing.js +1 -1
  29. package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
  30. package/src/sap/fe/core/controllerextensions/ViewState.js +1 -1
  31. package/src/sap/fe/core/controls/CommandExecution.js +1 -1
  32. package/src/sap/fe/core/controls/ConditionalWrapper.js +1 -1
  33. package/src/sap/fe/core/controls/CustomQuickViewPage.js +1 -1
  34. package/src/sap/fe/core/controls/FieldWrapper.js +1 -1
  35. package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
  36. package/src/sap/fe/core/converters/controls/Common/Table.js +22 -52
  37. package/src/sap/fe/core/converters/controls/Common/Table.ts +19 -39
  38. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +2 -2
  39. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +1 -1
  40. package/src/sap/fe/core/converters/helpers/Aggregation.js +15 -18
  41. package/src/sap/fe/core/converters/helpers/Aggregation.ts +11 -20
  42. package/src/sap/fe/core/designtime/AppComponent.designtime.js +1 -1
  43. package/src/sap/fe/core/fpm/Component.js +1 -1
  44. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -1
  45. package/src/sap/fe/core/helpers/EditState.js +1 -1
  46. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -1
  47. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  48. package/src/sap/fe/core/helpers/ModelHelper.js +1 -1
  49. package/src/sap/fe/core/helpers/PasteHelper.js +1 -1
  50. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  51. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
  52. package/src/sap/fe/core/helpers/SideEffectsUtil.js +1 -1
  53. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
  54. package/src/sap/fe/core/library.js +2 -2
  55. package/src/sap/fe/core/library.support.js +1 -1
  56. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +1 -1
  57. package/src/sap/fe/core/services/NavigationServiceFactory.js +1 -1
  58. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +1 -1
  59. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +1 -1
  60. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.core",
3
- "version": "1.90.0",
3
+ "version": "1.90.4",
4
4
  "description": "SAPUI5 Library sap.fe.core",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.90.0</version>
9
+ <version>1.90.4</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.core</documentation>
12
12
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // ----------------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/core/mvc/Controller", "sap/fe/core/CommonUtils"], function(Controller, CommonUtils) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(["sap/base/Log"], function(Log) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(
@@ -141,7 +141,11 @@ sap.ui.define(
141
141
  return (
142
142
  aRestrictedProperties &&
143
143
  aRestrictedProperties.find(function(oRestrictedProperty) {
144
- return oRestrictedProperty.NavigationProperty.$NavigationPropertyPath === sNavigationPath;
144
+ return (
145
+ oRestrictedProperty &&
146
+ oRestrictedProperty.NavigationProperty &&
147
+ oRestrictedProperty.NavigationProperty.$NavigationPropertyPath === sNavigationPath
148
+ );
145
149
  })
146
150
  );
147
151
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  /* eslint-disable no-alert */
6
6
  sap.ui.define(
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/base/Log", "sap/ui/base/Object"], function(Log, BaseObject) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  ["sap/ui/core/UIComponent", "sap/fe/core/CommonUtils", "sap/base/Log"],
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/base/Log", "sap/ui/base/Object", "sap/ui/model/json/JSONModel"], function(Log, BaseObject, JSONModel) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides static functions for the draft programming model
@@ -109,7 +109,7 @@ sap.ui.define(
109
109
  * Check if optional draft prepare action exists.
110
110
  *
111
111
  * @param {sap.ui.model.odata.v4.Context} oContext The context that should be bound to the operation
112
- * @returns {boolean} True if a a prepare action exists
112
+ * @returns {boolean} True if a prepare action exists
113
113
  */
114
114
  function hasPrepareAction(oContext) {
115
115
  return !!getActionName(oContext, draftOperations.PREPARE);
@@ -119,10 +119,10 @@ sap.ui.define(
119
119
  * Creates a new draft from an active document.
120
120
  *
121
121
  * @function
122
- * @param {sap.ui.model.odata.v4.Context} oContext context for which the action should be performed
122
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
123
123
  * @param {boolean} bPreserveChanges
124
124
  * <ul>
125
- * <li>true - existing changes from another user that are not locked are preserved and an error message (http status 409) is send from the backend</li>
125
+ * <li>true - existing changes from another user that are not locked are preserved and an error message (http status 409) is sent from the back end</li>
126
126
  * <li>false - existing changes from another user that are not locked are overwritten</li>
127
127
  * </ul>
128
128
  * @returns {Promise.<sap.ui.model.odata.v4.Context>} Resolve function returns the context of the operation
@@ -146,28 +146,34 @@ sap.ui.define(
146
146
  }
147
147
 
148
148
  /**
149
- * Activates a draft document. The draft will replace the sibling entity and will be deleted by the backend.
149
+ * Activates a draft document. The draft will replace the sibling entity and will be deleted by the back end.
150
150
  *
151
151
  * @function
152
- * @param {sap.ui.model.odata.v4.Context} oContext context for which the action should be performed
153
- * @param {string} [sGroupId] the optional batch group where we want to execute the operation in
152
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
153
+ * @param {string} [sGroupId] The optional batch group in which the operation is executed
154
154
  * @returns {Promise.<sap.ui.model.odata.v4.Context>} Resolve function returns the context of the operation
155
155
  * @private
156
156
  * @ui5-restricted
157
157
  */
158
158
 
159
159
  function executeDraftActivationAction(oContext, sGroupId) {
160
+ var bHasPrepareAction = hasPrepareAction(oContext);
161
+
162
+ // According to the draft spec if the service contains a prepare action and we trigger both prepare and
163
+ // activate in one $batch the activate action is called with iF-Match=*
164
+ var bIgnoreEtag = bHasPrepareAction;
165
+
160
166
  if (!oContext.getProperty("IsActiveEntity")) {
161
167
  var oOperation = createOperation(oContext, draftOperations.ACTIVATION, { $$inheritExpandSelect: true });
162
168
  return oOperation
163
- .execute(sGroupId)
169
+ .execute(sGroupId, bIgnoreEtag)
164
170
  .then(function(oActiveDocumentContext) {
165
171
  return oActiveDocumentContext;
166
172
  })
167
173
  .catch(
168
174
  //if ACTIVATE action fails then we request either the sideEffects against PREPARE action (if annotated) or the messages as fallback:
169
175
  function() {
170
- if (hasPrepareAction(oContext)) {
176
+ if (bHasPrepareAction) {
171
177
  var sActionName = getActionName(oContext, draftOperations.PREPARE),
172
178
  oBindingParameters = SideEffectsUtil.getSideEffectsForAction(sActionName, oContext),
173
179
  aTargetPaths = oBindingParameters && oBindingParameters.pathExpressions;
@@ -193,7 +199,7 @@ sap.ui.define(
193
199
  * Execute a preparation action.
194
200
  *
195
201
  * @function
196
- * @param {sap.ui.model.odata.v4.Context} oContext Context for which the action should be performed
202
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
197
203
  * @param {string} [sGroupId] The optional batch group where we want to execute the operation in
198
204
  * @param {boolean} [bPrepareForEdit] Shall the messages be requested if supported by service
199
205
  * @returns {Promise.<sap.ui.model.odata.v4.Context>} Resolve function returns the context of the operation
@@ -240,7 +246,7 @@ sap.ui.define(
240
246
  * Determines the message path for a context.
241
247
  *
242
248
  * @function
243
- * @param {sap.ui.model.odata.v4.Context} oContext Context for which the path shall be determined
249
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
244
250
  * @returns {string} Message path, empty if not annotated
245
251
  * @private
246
252
  * @ui5-restricted
@@ -256,7 +262,7 @@ sap.ui.define(
256
262
  * Requests the messages if annotated for a given context.
257
263
  *
258
264
  * @function
259
- * @param {sap.ui.model.odata.v4.Context} oContext Context for which the messages shall be requested
265
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
260
266
  * @returns {Promise} Promise which is resolved once messages were requested
261
267
  * @private
262
268
  * @ui5-restricted
@@ -272,7 +278,7 @@ sap.ui.define(
272
278
  * Executes discard of a draft function using HTTP Post.
273
279
  *
274
280
  * @function
275
- * @param {sap.ui.model.odata.v4.Context} oContext context for which the action should be performed
281
+ * @param {sap.ui.model.odata.v4.Context} oContext The context for which the action is performed
276
282
  * @returns {Promise.<sap.ui.model.odata.v4.Context>} Resolve function returns the context of the operation
277
283
  * @private
278
284
  * @ui5-restricted
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Static functions for Fiori Message Handling
@@ -153,10 +153,70 @@ sap.ui.define(
153
153
  var aUnboundMessages = getMessages(),
154
154
  oMessageManager = sap.ui.getCore().getMessageManager(),
155
155
  sHighestPriority,
156
- sHighestPriorityText;
156
+ sHighestPriorityText,
157
+ aFilters = [new Filter({ path: "code", operator: FilterOperator.NE, value1: undefined })],
158
+ showMessageDialog = false;
157
159
 
158
160
  if (bShowBoundTransition) {
159
161
  aUnboundMessages.push.apply(aUnboundMessages, getMessages(true, true));
162
+ // we only want to show bound transition messages not bound state messages hence add a filter for the same
163
+ aFilters.push(new Filter({ path: "persistent", operator: FilterOperator.EQ, value1: true }));
164
+ var fnCheckControlIdInDialog = function(aControlIds) {
165
+ var index = Infinity,
166
+ oControl = sap.ui.getCore().byId(aControlIds[0]),
167
+ errorFieldControl = sap.ui.getCore().byId(aControlIds[0]);
168
+ while (oControl) {
169
+ var fieldRankinDialog =
170
+ oControl instanceof Dialog
171
+ ? errorFieldControl
172
+ .getParent()
173
+ .findElements(true)
174
+ .indexOf(errorFieldControl)
175
+ : Infinity;
176
+ if (oControl instanceof Dialog) {
177
+ if (index > fieldRankinDialog) {
178
+ index = fieldRankinDialog;
179
+ // Set the focus to the dialog's control
180
+ errorFieldControl.focus();
181
+ }
182
+ // messages with target inside sap.m.Dialog should not bring up the message dialog
183
+ return false;
184
+ }
185
+ oControl = oControl.getParent();
186
+ }
187
+ return true;
188
+ };
189
+ aFilters.push(
190
+ new Filter({
191
+ path: "controlIds",
192
+ test: fnCheckControlIdInDialog,
193
+ caseSensitive: true
194
+ })
195
+ );
196
+ } else {
197
+ // only unbound messages have to be shown so add filter accordingly
198
+ aFilters.push(new Filter({ path: "target", operator: FilterOperator.EQ, value1: "" }));
199
+ }
200
+ if (aCustomMessages && aCustomMessages.length) {
201
+ aCustomMessages.forEach(function(oMessage) {
202
+ var messageCode = oMessage.code ? oMessage.code : "";
203
+ oMessageManager.addMessages(
204
+ new Message({
205
+ message: oMessage.text,
206
+ type: oMessage.type,
207
+ target: "",
208
+ persistent: true,
209
+ code: messageCode
210
+ })
211
+ );
212
+ //The target and persistent properties of the message are hardcoded as "" and true because the function deals with only unbound messages.
213
+ });
214
+ }
215
+ var oListBinding = oMessageManager.getMessageModel().bindList("/", undefined, undefined, aFilters),
216
+ aCurrentContexts = oListBinding.getCurrentContexts();
217
+ if (aCurrentContexts && aCurrentContexts.length > 0) {
218
+ // Don't show dialog incase there are no errors to show
219
+ showMessageDialog = true;
160
220
  }
161
221
  if (aUnboundMessages.length === 0 && !aCustomMessages && !bHasEtagMessage) {
162
222
  // Don't show the popup if there are no transient messages
@@ -167,7 +227,7 @@ sap.ui.define(
167
227
  oMessageManager.removeMessages(aUnboundMessages);
168
228
  resolve();
169
229
  });
170
- } else {
230
+ } else if (showMessageDialog) {
171
231
  that.aResolveFunctions = that.aResolveFunctions || [];
172
232
  return new Promise(function(resolve, reject) {
173
233
  that.aResolveFunctions.push(resolve);
@@ -203,7 +263,7 @@ sap.ui.define(
203
263
  },
204
264
  items: {
205
265
  path: "/",
206
- filters: [new Filter("code", FilterOperator.NE, undefined)],
266
+ filters: aFilters,
207
267
  template: that.oMessageTemplate
208
268
  }
209
269
  });
@@ -217,21 +277,6 @@ sap.ui.define(
217
277
  this.setVisible(false);
218
278
  }
219
279
  });
220
- if (aCustomMessages && aCustomMessages.length) {
221
- aCustomMessages.forEach(function(oMessage) {
222
- var messageCode = oMessage.code ? oMessage.code : "";
223
- oMessageManager.addMessages(
224
- new Message({
225
- message: oMessage.text,
226
- type: oMessage.type,
227
- target: "",
228
- persistent: true,
229
- code: messageCode
230
- })
231
- );
232
- //The target and persistent properties of the message are hardcoded as "" and true because the function deals with only unbound messages.
233
- });
234
- }
235
280
  that.oMessageView.setModel(oMessageManager.getMessageModel());
236
281
  that.oDialog =
237
282
  that.oDialog ||
@@ -239,7 +284,13 @@ sap.ui.define(
239
284
  resizable: true,
240
285
  content: that.oMessageView,
241
286
  endButton: new Button({
242
- press: dialogCloseHandler,
287
+ press: function() {
288
+ dialogCloseHandler();
289
+ // also remove bound transition messages if we were showing them
290
+ if (bShowBoundTransition) {
291
+ removeBoundTransitionMessages();
292
+ }
293
+ },
243
294
  text: oResourceBundle.getText("C_COMMON_SAPFE_CLOSE")
244
295
  }),
245
296
  customHeader: new sap.m.Bar({
@@ -294,6 +345,8 @@ sap.ui.define(
294
345
  })
295
346
  .catch(reject);
296
347
  });
348
+ } else {
349
+ return Promise.resolve(true);
297
350
  }
298
351
  }
299
352
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides static functions for the non-draft programming model
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides static functions to call OData actions (bound/import) and functions (bound/import)
@@ -423,7 +423,6 @@ sap.ui.define(
423
423
  // TODO: move the dialog into the fragment and move the handlers to the oController
424
424
  return Fragment.load({ definition: oFragment, controller: oController }).then(function(oDialogContent) {
425
425
  var oOperationBinding;
426
- var messageParams = {};
427
426
  var oResourceBundle = oParentControl.getController().oResourceBundle;
428
427
  var oDialog = new Dialog({
429
428
  title:
@@ -456,8 +455,9 @@ sap.ui.define(
456
455
  type: "Error"
457
456
  });
458
457
  }
459
- messageParams.customMessages = oMessages;
460
- messageHandler.showMessageDialog(messageParams);
458
+ messageHandler.showMessageDialog({
459
+ customMessages: oMessages
460
+ });
461
461
  return;
462
462
  }
463
463
  var aMessages = sap.ui
@@ -523,9 +523,11 @@ sap.ui.define(
523
523
  oResourceBundle
524
524
  );
525
525
 
526
- messageParams.bHasEtagMessage = bHasEtagMessage;
527
- messageParams.context = mParameters.aContexts[0];
528
- messageHandler.showMessageDialog(messageParams);
526
+ messageHandler.showMessageDialog({
527
+ bHasEtagMessage: bHasEtagMessage,
528
+ context: mParameters.aContexts[0],
529
+ isActionParameterDialogOpen: true
530
+ });
529
531
  if (oDialog && bHasEtagMessage) {
530
532
  oDialog.close(); //close the action parameter dialog after refresh of the context after etag mismatch
531
533
  }
@@ -922,16 +924,14 @@ sap.ui.define(
922
924
  sGroupId,
923
925
  fnExecuteAction = function(oAction, index, oSideEffect) {
924
926
  setActionParameterDefaultValue();
925
- sGroupId = !bGrouped ? "actionGroup" : oAction.getUpdateGroupId();
927
+ // For invocation grouping "isolated" need batch group per action call
928
+ sGroupId = !bGrouped ? "$auto." + index : oAction.getUpdateGroupId();
926
929
  oActionPromise = bGetBoundContext
927
930
  ? oAction.execute(sGroupId).then(function() {
928
931
  return oAction.getBoundContext();
929
932
  })
930
933
  : oAction.execute(sGroupId);
931
934
  aActionPromises.push(oActionPromise);
932
- if (!bGrouped) {
933
- oModel.submitBatch(sGroupId);
934
- }
935
935
  // trigger actions from side effects
936
936
  if (oSideEffect && oSideEffect.triggerActions && oSideEffect.triggerActions.length) {
937
937
  oSideEffect.triggerActions.forEach(function(sTriggerAction) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides static functions for the sticky session programming model
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides ControllerMetadata
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -104,16 +104,19 @@ sap.ui.define(
104
104
  if (sProgrammingModel === ProgrammingModel.Sticky) {
105
105
  that._getInternalModel().setProperty("/sessionOn", true);
106
106
  }
107
- that._setEditMode(EditMode.Editable, false);
107
+ if (oNewDocumentContext) {
108
+ that._setEditMode(EditMode.Editable, false);
109
+ that._getMessageHandler().showMessageDialog();
108
110
 
109
- if (oNewDocumentContext !== oContext) {
110
- return that._handleNewContext(oNewDocumentContext, true, undefined, bDraftNavigation).then(function() {
111
- if (sProgrammingModel === ProgrammingModel.Sticky) {
112
- // The stickyOn handler must be set after the navigation has been done,
113
- // as the URL may change in the case of FCL
114
- that._handleStickyOn(oNewDocumentContext);
115
- }
116
- });
111
+ if (oNewDocumentContext !== oContext) {
112
+ return that._handleNewContext(oNewDocumentContext, true, undefined, bDraftNavigation).then(function() {
113
+ if (sProgrammingModel === ProgrammingModel.Sticky) {
114
+ // The stickyOn handler must be set after the navigation has been done,
115
+ // as the URL may change in the case of FCL
116
+ that._handleStickyOn(oNewDocumentContext);
117
+ }
118
+ });
119
+ }
117
120
  }
118
121
  });
119
122
  },
@@ -221,6 +224,10 @@ sap.ui.define(
221
224
  function handleSideEffects(oListBinding, oCreationPromise) {
222
225
  oCreationPromise
223
226
  .then(function(oNewContext) {
227
+ // transient contexts are reliably removed once oNewContext.created() is resolved
228
+ return oNewContext.created();
229
+ })
230
+ .then(function() {
224
231
  var oBindingContext = that.getView().getBindingContext();
225
232
  // if there are transient contexts, we must avoid requesting side effects
226
233
  // this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
@@ -541,6 +548,7 @@ sap.ui.define(
541
548
  }
542
549
 
543
550
  that._setEditMode(EditMode.Display, false);
551
+ that._getMessageHandler().showMessageDialog();
544
552
 
545
553
  if (oActiveDocumentContext !== oContext) {
546
554
  that._handleNewContext(oActiveDocumentContext, false, undefined, bDraftNavigation);
@@ -548,6 +556,7 @@ sap.ui.define(
548
556
  })
549
557
  .catch(function(oError) {
550
558
  Log.error("Error while saving the document", oError);
559
+ return Promise.reject(oError);
551
560
  })
552
561
  );
553
562
  },
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution"], function(
6
6
  ControllerExtension,
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -113,6 +113,14 @@ sap.ui.define(
113
113
 
114
114
  return Promise.all(aCreationPromises);
115
115
  })
116
+ .then(function(aContexts) {
117
+ // transient contexts are reliably removed once oNewContext.created() is resolved
118
+ return Promise.all(
119
+ aContexts.map(function(oNewContext) {
120
+ return oNewContext.created();
121
+ })
122
+ );
123
+ })
116
124
  .then(function() {
117
125
  var oBindingContext = that.getView().getBindingContext();
118
126
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution", "sap/fe/core/actions/messageHandling"], function(
@@ -68,10 +68,20 @@ sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideE
68
68
  * @since 1.90.0
69
69
  */
70
70
  showMessageDialog: function(mParameters) {
71
- var customMessages = mParameters && mParameters.customMessages ? mParameters.customMessages : undefined;
71
+ var customMessages = mParameters && mParameters.customMessages ? mParameters.customMessages : undefined,
72
+ oOPInternalBindingContext = this.base.getView().getBindingContext("internal");
73
+ // set isActionParameterDialog open so that it can be used in the controller extension to decide whether message dialog should open or not
74
+ if (mParameters && mParameters.isActionParameterDialogOpen && oOPInternalBindingContext) {
75
+ oOPInternalBindingContext.setProperty("isActionParameterDialogOpen", true);
76
+ }
72
77
  var bShowBoundMessages = this.getShowBoundMessagesInMessageDialog();
73
78
  var oBindingContext = mParameters && mParameters.context ? mParameters.context : this.getView().getBindingContext();
74
79
  var bEtagMessage = mParameters && mParameters.bHasEtagMessage;
80
+ // reset isActionParameterDialogOpen
81
+ // cannot do this operations.js since it is not aware of the view
82
+ if (oOPInternalBindingContext) {
83
+ oOPInternalBindingContext.setProperty("isActionParameterDialogOpen", false);
84
+ }
75
85
  return new Promise(function(resolve, reject) {
76
86
  // we have to set a timeout to be able to access the most recent messages
77
87
  setTimeout(function() {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/fe/core/BusyLocker", "sap/base/util/UriParameters", "sap/base/Log"], function(
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution"], function(
6
6
  ControllerExtension,
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/fe/core/controllerextensions/InternalRouting"], function(InternalRouting) {
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [