@sapui5/sap.fe.templates 1.92.0 → 1.93.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/package.json +2 -3
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/ListReport/Component.js +7 -0
  4. package/src/sap/fe/templates/ListReport/ListReport.view.xml +71 -25
  5. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +50 -23
  6. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +6 -2
  7. package/src/sap/fe/templates/ListReport/overrides/Share.js +47 -37
  8. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +74 -160
  9. package/src/sap/fe/templates/ObjectPage/Component.js +0 -4
  10. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +6 -4
  11. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +34 -49
  12. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +95 -66
  13. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -0
  14. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +21 -6
  15. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +21 -17
  16. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +4 -4
  17. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +55 -49
  18. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
  19. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +2 -2
  20. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +0 -1
  21. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacetCustomContainer.fragment.xml +14 -26
  22. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +2 -2
  23. package/src/sap/fe/templates/library.js +1 -1
  24. package/src/sap/fe/templates/messagebundle.properties +3 -3
@@ -22,103 +22,57 @@ sap.ui.define(
22
22
  return "{path: ''}";
23
23
  }
24
24
  },
25
+
25
26
  /**
26
- * Function to compute the visibility of the 'Delete' button in case of 'DeleteHidden' annotation.
27
+ * Function to check if draft pattern is supported.
27
28
  *
28
- * @param {object} [oDeleteHidden] Entity Set: 'DeleteHidden' value
29
- * @param {string} [sDeleteHiddenInEntityType] Entity Type: 'DeleteHidden' value
30
- * @returns {string} Expression binding or Boolean value based on oDeleteHidden
29
+ * @param {object} oAnnotations Annotations of the current entity set.
30
+ * @returns {string} Returns the Boolean value based on draft state
31
31
  */
32
- getButtonVisiblityForDeleteHidden: function(oDeleteHidden, sDeleteHiddenInEntityType) {
33
- if (oDeleteHidden) {
34
- return oDeleteHidden === "false"
35
- ? "{= (${ui>/editMode} === 'Editable')}"
36
- : "{= (${ui>/editMode} === 'Editable') && !$" + oDeleteHidden + "}";
37
- } else if (sDeleteHiddenInEntityType) {
38
- return sDeleteHiddenInEntityType === "false"
39
- ? "{= (${ui>/editMode} === 'Editable')}"
40
- : "{= (${ui>/editMode} === 'Editable') && !$" + sDeleteHiddenInEntityType + "}";
32
+ checkDraftState: function(oAnnotations) {
33
+ if (
34
+ oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"] &&
35
+ oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"]["EditAction"]
36
+ ) {
37
+ return true;
41
38
  } else {
42
- return "{= (${ui>/editMode} === 'Editable')}";
43
- }
44
- },
45
- /**
46
- * Function to get the visibility for the Delete button in the object page/sub-object page.
47
- *
48
- * @param {object} [oDeletable] Current Entity Set delete restriction value.
49
- * @param {number} [viewLevel] The view level to differentiate between object page and sub-object page[Only passed in case of Delete]
50
- * @param {object} [oDeleteHidden] Entity Set delete hidden value.
51
- * @param {*} [bParentDeleteRestrictionEnabled] The parent entity's delete restriction value via navigation restriction.
52
- * @param {string} [sDeleteHiddenInEntityType] Entity Type delete hidden value
53
- * @returns {string} Returns expression binding or boolean value based on oDeleteHidden, viewLevel
54
- */
55
- getDeleteButtonVisibility: function(
56
- oDeletable,
57
- viewLevel,
58
- oDeleteHidden,
59
- bParentDeleteRestrictionEnabled,
60
- sDeleteHiddenInEntityType
61
- ) {
62
- var bParentDeletable =
63
- bParentDeleteRestrictionEnabled === "true" ||
64
- (bParentDeleteRestrictionEnabled !== "false" && typeof bParentDeleteRestrictionEnabled === "string");
65
- if ((oDeletable === "false" && !bParentDeletable) || oDeleteHidden === "true" || sDeleteHiddenInEntityType === "true") {
66
39
  return false;
67
40
  }
68
- if (viewLevel > 1) {
69
- return AnnotationHelper.getButtonVisiblityForDeleteHidden(oDeleteHidden, sDeleteHiddenInEntityType);
70
- } else if (oDeleteHidden) {
71
- return oDeleteHidden === "false"
72
- ? "{= !(${ui>/editMode} === 'Editable')}"
73
- : "{= !(${ui>/editMode} === 'Editable') && !$" + oDeleteHidden + "}";
74
- } else if (sDeleteHiddenInEntityType) {
75
- return sDeleteHiddenInEntityType === "false"
76
- ? "{= !(${ui>/editMode} === 'Editable')}"
77
- : "{= !(${ui>/editMode} === 'Editable') && !$" + sDeleteHiddenInEntityType + "}";
78
- } else {
79
- return "{= !(${ui>/editMode} === 'Editable')}";
80
- }
81
41
  },
82
42
 
83
43
  /**
84
- * Function to get the visibility for the SwitchToActive button in the object page/subobject page.
44
+ * Function to get the visibility for the SwitchToActive button in the object page or subobject page.
85
45
  *
86
- * @param {object} oAnnotations Annotations of current entity set.
87
- * @returns {string} Returns expression binding or Boolean value based on draft state
46
+ * @param {object} oAnnotations Annotations of the current entity set.
47
+ * @returns {string} Returns expression binding or Boolean value based on the draft state
88
48
  */
89
49
  getSwitchToActiveVisibility: function(oAnnotations) {
90
- if (
91
- oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"] &&
92
- oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"]["EditAction"]
93
- ) {
94
- return "{= ${viewData>/showDraftToggle} && (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsProcessedByMe} }";
50
+ if (this.checkDraftState(oAnnotations)) {
51
+ return "{= (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsCreatedByMe} }";
95
52
  } else {
96
53
  return false;
97
54
  }
98
55
  },
99
56
 
100
57
  /**
101
- * Function to get the visibility for the SwitchToDraft button in the object page/subobject page.
58
+ * Function to get the visibility for the SwitchToDraft button in the object page or subobject page.
102
59
  *
103
- * @param {object} oAnnotations Annotations of current entity set.
104
- * @returns {string} Returns expression binding or Boolean value based on draft state
60
+ * @param {object} oAnnotations Annotations of the current entity set.
61
+ * @returns {string} Returns expression binding or Boolean value based on the draft state
105
62
  */
106
63
  getSwitchToDraftVisibility: function(oAnnotations) {
107
- if (
108
- oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"] &&
109
- oAnnotations["@com.sap.vocabularies.Common.v1.DraftRoot"]["EditAction"]
110
- ) {
111
- return "{= ${viewData>/showDraftToggle} && !(${ui>/editMode} === 'Editable') && !${ui>createMode} && (${HasDraftEntity} && %{DraftAdministrativeData/DraftIsProcessedByMe}) }";
64
+ if (this.checkDraftState(oAnnotations)) {
65
+ return "{= !(${ui>/editMode} === 'Editable') && !${ui>createMode} && (${HasDraftEntity} && %{DraftAdministrativeData/DraftIsCreatedByMe}) }";
112
66
  } else {
113
67
  return false;
114
68
  }
115
69
  },
116
70
 
117
71
  /**
118
- * Function to format enable property for the Delete button in the object page/sub-object page in case of Command Execution.
119
- * @param {object} oDeletable Current Entity Set delete restriction value.
120
- * @param {Array} aConverterContextHeaderActions Array of Header actions in Object page.
121
- * @returns {string} Returns expression binding or boolean value based on oDeleteHidden, viewLevel.
72
+ * Function to format the 'enable' property for the Delete button in the object page or subobject page in case of Command Execution.
73
+ * @param {object} oDeletable Current 'delete' restriction value for the entity set.
74
+ * @param {Array} aConverterContextHeaderActions Array of 'header' actions on the object page.
75
+ * @returns {string} Returns the expression binding or Boolean value based on oDeleteHidden, viewLevel.
122
76
  */
123
77
  getDeleteCommandExecutionEnabled: function(oDeletable, aConverterContextHeaderActions) {
124
78
  var oDeleteAction = aConverterContextHeaderActions.find(function(oAction) {
@@ -127,37 +81,36 @@ sap.ui.define(
127
81
  return this.getDeleteButtonEnabled(oDeletable, oDeleteAction.parentEntityDeleteEnabled);
128
82
  },
129
83
  /**
130
- * Function to format visible property for the Delete button in the object page/sub-object page in case of Command Execution.
131
- * @param {object} oDeletable Current Entity Set delete restriction value.
132
- * @param {number} viewLevel The view level to differenciate between object page and sub-object page[Only passed in case of Delete
133
- * @param {object} oDeleteHidden Entity Set delete hidden value.
134
- * @param {Array} aConverterContextHeaderActions Array of Header actions in Object page.
135
- * @param {string} sDeleteHiddenInEntityType Entity Type delete hidden value.
136
- * @returns {string} Returns expression binding or boolean value based on oDeleteHidden, viewLevel.
84
+ * Function to format the 'visible' property for the Delete button on the object page or subobject page in case of a Command Execution.
85
+ *
86
+ * @param {Array} aConverterContextHeaderActions Array of header actions on the object page
87
+ * @returns {string} Returns expression binding or Boolean value from the converter output
137
88
  */
138
- getDeleteCommandExecutionVisible: function(
139
- oDeletable,
140
- viewLevel,
141
- oDeleteHidden,
142
- aConverterContextHeaderActions,
143
- sDeleteHiddenInEntityType
144
- ) {
89
+ getDeleteCommandExecutionVisible: function(aConverterContextHeaderActions) {
145
90
  var oDeleteAction = aConverterContextHeaderActions.find(function(oAction) {
146
91
  return oAction.type === "Secondary";
147
92
  });
148
- return this.getDeleteButtonVisibility(
149
- oDeletable,
150
- viewLevel,
151
- oDeleteHidden,
152
- oDeleteAction.parentEntityDeleteEnabled,
153
- sDeleteHiddenInEntityType
154
- );
93
+
94
+ return oDeleteAction ? oDeleteAction.visible : "true";
155
95
  },
156
96
  /**
157
- * Function to get the enablement for the Delete button in the object page/sub-object page.
97
+ * Function to format the 'visible' property for the Edit button on the object page or subobject page in case of a Command Execution.
158
98
  *
159
- * @param {object} [oDeletable] Current Entity Set delete restriction value.
160
- * @returns {string} Returns expression binding or boolean value based on oDeletable
99
+ * @param {Array} aConverterContextHeaderActions Array of header actions on the object page
100
+ * @returns {string} Returns expression binding or Boolean value from the converter output
101
+ */
102
+ getEditCommandExecutionVisible: function(aConverterContextHeaderActions) {
103
+ var oEditAction = aConverterContextHeaderActions.find(function(oAction) {
104
+ return oAction.type === "Primary";
105
+ });
106
+
107
+ return oEditAction ? oEditAction.visible : "true";
108
+ },
109
+ /**
110
+ * Function to get the enablement for the Delete button on the object page or subobject page.
111
+ *
112
+ * @param {object} [oDeletable] Delete restrictions on the entity set
113
+ * @returns {string} Returns expression binding or Boolean value based on oDeletable
161
114
  */
162
115
  fnGetDeleteButtonEnabled: function(oDeletable) {
163
116
  if (oDeletable === "false") {
@@ -380,44 +333,19 @@ sap.ui.define(
380
333
  return true;
381
334
  }
382
335
  },
336
+
383
337
  /*
384
- * Get expression for header action's visible property.
385
- *
386
- * @function
387
- * @param {object} [oEntitySet] entity set information
388
- * @param {string} [sHiddenBindingExpression] hidden binding expression resolved from model
389
- * @param {string} [sUpdateHiddenInEntityType] update hidden binding expression from entityType
390
- * returns {string} Expression based on ui model's property editMode
391
- */
392
- getButtonVisiblityForHeaderActions: function(oEntitySet, sHiddenBindingExpression, sUpdateHiddenInEntityType, viewData) {
393
- var sResult = "{= !(${ui>/editMode} === 'Editable')";
394
- if (sHiddenBindingExpression === "true" || sUpdateHiddenInEntityType === "true") {
395
- return false;
396
- } else if (sHiddenBindingExpression === "false" || sUpdateHiddenInEntityType === "false") {
397
- sResult = sResult + "";
398
- } else if (sHiddenBindingExpression) {
399
- sResult = sResult + " && !$" + sHiddenBindingExpression;
400
- } else if (sUpdateHiddenInEntityType) {
401
- sResult = sResult + " && !$" + sUpdateHiddenInEntityType;
402
- } else if (oEntitySet && !oEntitySet["@com.sap.vocabularies.UI.v1.UpdateHidden"]) {
403
- sResult = sResult + "";
404
- }
405
- if (viewData && viewData.showDraftToggle) {
406
- // test for toggle feature not showing the edit button in case of "show saved version"
407
- sResult =
408
- sResult + " && (!${HasDraftEntity} || (${HasDraftEntity} && !%{DraftAdministrativeData/DraftIsProcessedByMe})) ";
409
- }
410
- return sResult + "}";
411
- },
412
- /*
413
- * Get expression for annotation action's enable property.
338
+ * Gets the expression for the enablement of the action annotation.
414
339
  *
415
340
  * @function
416
- * @param {object} [oBound] bound action context
417
- * @param {object} [oActionContext] action context object
418
- * @param {object} [oDataField] data field object
419
- * @param {string} [sFormattedValueOperationalAvailable] string value of operational available
420
- * returns {*} both string and expressions if none of the condition satisfies the button is enabled in case of bound is false a string true is return
341
+ * @param {object} [oBound] The Bound action context
342
+ * @param {object} [oActionContext] The object of the action context
343
+ * @param {object} [oDataField] The object of the data field
344
+ * @param {string} [sFormattedValueOperationalAvailable] The string value of the available operation
345
+ * returns {*} returns {*} both Boolean and expression with the following logic:
346
+ * if none of the conditions is met, the button is enabled
347
+ * if bound is false, then 'true' is returned as a string
348
+ * in all other cases a runtime binding expression is returned
421
349
  */
422
350
  getButtonEnabledForAnnotationAction: function(oBound, oActionContext, oDataField, sFormattedValueOperationalAvailable) {
423
351
  if (oBound && oBound.$IsBound !== true) {
@@ -495,14 +423,19 @@ sap.ui.define(
495
423
  entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
496
424
  invocationGrouping: CommonHelper.addSingleQuotes(sInvocationGroup),
497
425
  model: "${$source>/}.getModel()",
498
- label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label),
426
+ label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label, true),
499
427
  isNavigable: oHeaderAction && oHeaderAction.isNavigable,
500
428
  defaultValuesExtensionFunction:
501
429
  oHeaderAction && oHeaderAction.defaultValuesExtensionFunction
502
430
  ? "'" + oHeaderAction.defaultValuesExtensionFunction + "'"
503
431
  : undefined
504
432
  };
505
- return CommonHelper.generateFunction(".editFlow.invokeAction", sEditableContexts, CommonHelper.objectToString(oParams));
433
+ return CommonHelper.generateFunction(
434
+ ".handlers.onCallAction",
435
+ "${$view>/}",
436
+ sEditableContexts,
437
+ CommonHelper.objectToString(oParams)
438
+ );
506
439
  },
507
440
  /*
508
441
  * Method to get the expression for the 'press' event for footer annotation actions
@@ -523,7 +456,7 @@ sap.ui.define(
523
456
  entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
524
457
  invocationGrouping: CommonHelper.addSingleQuotes(sInvocationGroup),
525
458
  model: "${$source>/}.getModel()",
526
- label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label),
459
+ label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label, true),
527
460
  isNavigable: oHeaderAction && oHeaderAction.isNavigable,
528
461
  defaultValuesExtensionFunction:
529
462
  oHeaderAction && oHeaderAction.defaultValuesExtensionFunction
@@ -531,19 +464,19 @@ sap.ui.define(
531
464
  : undefined
532
465
  };
533
466
  return CommonHelper.generateFunction(
534
- ".handlers.onCallActionFromFooter",
467
+ ".handlers.onCallAction",
535
468
  "${$view>/}",
536
469
  sActionContexts,
537
470
  CommonHelper.objectToString(oParams)
538
471
  );
539
472
  },
540
473
  /*
541
- * Get binding of container HBox for header facet.
474
+ * Gets the binding of the container HBox for the header facet.
542
475
  *
543
476
  * @function
544
- * @param {object} [oControlConfiguration] control configuration form viewData model
545
- * @param {object} [oHeaderFacet] header facet object
546
- * returns {*} binding expression from function getBindingWithGroupIdFromConfig or undefined.
477
+ * @param {object} [oControlConfiguration] The control configuration form of the viewData model
478
+ * @param {object} [oHeaderFacet] The object of the header facet
479
+ * returns {*} The binding expression from function getBindingWithGroupIdFromConfig or undefined.
547
480
  */
548
481
  getStashableHBoxBinding: function(oControlConfiguration, oHeaderFacet) {
549
482
  if (oHeaderFacet && oHeaderFacet.Facet && oHeaderFacet.Facet.targetAnnotationType === "DataPoint") {
@@ -553,33 +486,14 @@ sap.ui.define(
553
486
  );
554
487
  }
555
488
  },
556
- /*
557
- * Get chart title for microchart in headerfacet .
558
- *
559
- * @function
560
- * @param {object} [oViewData] view data model
561
- * @param {object} [oHeaderFacet] header facet object
562
- * @param {string} [sCommonHeaderTitle] comman used header title string
563
- * returns {*} string (commanly used header string => sCommonHeaderTitle) or undefied
564
- */
565
- getChartTitleDescribedBy: function(oViewData, oHeaderFacet, sCommonHeaderTitle) {
566
- var sAnnotationPath = oHeaderFacet && oHeaderFacet.Target && oHeaderFacet.Target["$AnnotationPath"],
567
- bCondition =
568
- oViewData &&
569
- oViewData.controlConfiguration &&
570
- oViewData.controlConfiguration[sAnnotationPath] &&
571
- oViewData.controlConfiguration[sAnnotationPath]["navigation"] &&
572
- oViewData.controlConfiguration[sAnnotationPath]["navigation"]["targetSections"];
573
- return bCondition ? sCommonHeaderTitle : undefined;
574
- },
575
489
 
576
490
  /*
577
- * Get Press event expression for external and internal data point link .
491
+ * Gets the 'Press' event expression for the external and internal data point link.
578
492
  *
579
493
  * @function
580
- * @param {object} [oConfiguration] view data model
581
- * @param {object} [oManifestOutbound] Manifest setting object
582
- * returns {string} the function's press event's run time binding
494
+ * @param {object} [oConfiguration] Control configuration from manifest
495
+ * @param {object} [oManifestOutbound] Outbounds from manifest
496
+ * returns {string} The runtime binding of the 'Press' event
583
497
  */
584
498
  getPressExpressionForLink: function(oConfiguration, oManifestOutbound) {
585
499
  if (oConfiguration) {
@@ -55,10 +55,6 @@ sap.ui.define(
55
55
  type: "boolean",
56
56
  defaultValue: true
57
57
  },
58
- showDraftToggle: {
59
- type: "boolean",
60
- defaultValue: false
61
- },
62
58
  /**
63
59
  * Enables the BreadCrumbs features
64
60
  */
@@ -38,6 +38,8 @@
38
38
  showAnchorBar="{converterContext>showAnchorBar}"
39
39
  upperCaseAnchorBar="false"
40
40
  useIconTabBar="{converterContext>useIconTabBar}"
41
+ toggleHeaderOnTitleClick="{converterContext>showAnchorBar}"
42
+ headerContentPinnable="{converterContext>showAnchorBar}"
41
43
  enableLazyLoading="true"
42
44
  navigate=".handlers.onNavigateChange"
43
45
  >
@@ -47,22 +49,22 @@
47
49
  <control:CommandExecution
48
50
  execute="._editDocument(${$view>/getBindingContext})"
49
51
  enabled="{= OP.getEnabledExpressionForHeaderActions(${operationAvailable>}, ${entitySet>@}, ${operationAvailable>@@MODEL.format}) }"
50
- visible="{= OP.getButtonVisiblityForHeaderActions(${entitySet>@}, %{entitySet>@com.sap.vocabularies.UI.v1.UpdateHidden@@MODEL.value}, ${entityType>@com.sap.vocabularies.UI.v1.UpdateHidden@@MODEL.value}, ${viewData>/}) }"
52
+ visible="{= OP.getEditCommandExecutionVisible(${converterContext>headerActions}) }"
51
53
  command="Edit"
52
54
  />
53
55
  <control:CommandExecution
54
- execute="._toggleActiveDraft(${$view>/getBindingContext})"
56
+ execute=".editFlow.toggleDraftActive(${$view>/getBindingContext})"
55
57
  visible="{= OP.getSwitchToActiveVisibility(${entitySet>@}) }"
56
58
  command="SwitchToActiveObject"
57
59
  />
58
60
  <control:CommandExecution
59
- execute="._toggleActiveDraft(${$view>/getBindingContext})"
61
+ execute=".editFlow.toggleDraftActive(${$view>/getBindingContext})"
60
62
  visible="{= OP.getSwitchToDraftVisibility(${entitySet>@}) }"
61
63
  command="SwitchToDraftObject"
62
64
  />
63
65
  <control:CommandExecution
64
66
  execute="{= OP.getPressExpressionForDelete(${entitySet>@sapui.name}) }"
65
- visible="{= OP.getDeleteCommandExecutionVisible(${entitySet>@Org.OData.Capabilities.V1.DeleteRestrictions/Deletable@@MODEL.value}, ${viewData>viewLevel}, ${entitySet>@com.sap.vocabularies.UI.v1.DeleteHidden@@MODEL.value}, ${converterContext>headerActions}, ${entityType>@com.sap.vocabularies.UI.v1.DeleteHidden@@MODEL.value}) }"
67
+ visible="{= OP.getDeleteCommandExecutionVisible(${converterContext>headerActions}) }"
66
68
  enabled="{= OP.getDeleteCommandExecutionEnabled(${entitySet>@Org.OData.Capabilities.V1.DeleteRestrictions/Deletable@@MODEL.value}, ${converterContext>headerActions}) }"
67
69
  command="DeleteObject"
68
70
  />
@@ -77,8 +77,6 @@ sap.ui.define(
77
77
  ) {
78
78
  "use strict";
79
79
 
80
- var iMessages;
81
-
82
80
  return PageController.extend("sap.fe.templates.ObjectPage.ObjectPageController", {
83
81
  metadata: {
84
82
  methods: {
@@ -161,6 +159,12 @@ sap.ui.define(
161
159
  }
162
160
  this.extensionAPI && this.extensionAPI.destroy();
163
161
  delete this.extensionAPI;
162
+
163
+ var oMessageButton = this.getView().byId("fe::FooterBar::MessageButton"),
164
+ oMessagePopover = oMessageButton ? oMessageButton.oMessagePopover : null;
165
+ if (oMessagePopover && oMessagePopover.isOpen()) {
166
+ oMessagePopover.close();
167
+ }
164
168
  },
165
169
 
166
170
  _getTableBinding: function(oTable) {
@@ -312,6 +316,7 @@ sap.ui.define(
312
316
  aTables.forEach(function(oTable) {
313
317
  var oInternalModelContext = oTable.getBindingContext("internal");
314
318
  oInternalModelContext.setProperty("creationRowFieldValidity", {});
319
+ oInternalModelContext.setProperty("creationRowCustomValidity", {});
315
320
 
316
321
  aIBNActions = CommonUtils.getIBNActions(oTable, aIBNActions);
317
322
  // temporary workaround for BCP: 2080218004
@@ -574,7 +579,6 @@ sap.ui.define(
574
579
  _getFooterVisibility: function(oEvent) {
575
580
  var oInternalModelContext = this.getView().getBindingContext("internal");
576
581
  var sViewId = this.getView().getId();
577
- iMessages = oEvent.getParameter("iMessageLength");
578
582
  oInternalModelContext.setProperty("messageFooterContainsErrors", false);
579
583
  sap.ui
580
584
  .getCore()
@@ -588,15 +592,23 @@ sap.ui.define(
588
592
  });
589
593
  },
590
594
 
591
- _showMessagePopover: function(oMessageButton) {
592
- var oMessagePopover = oMessageButton.oMessagePopover,
595
+ _showMessagePopover: function(err, oRet) {
596
+ if (err) {
597
+ Log.error(err);
598
+ }
599
+ var that = this;
600
+ var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton"),
601
+ oMessagePopover = oMessageButton.oMessagePopover,
593
602
  oItemBinding = oMessagePopover.getBinding("items");
594
- if (oItemBinding.getLength() > 0) {
603
+
604
+ if (oItemBinding.getLength() > 0 && !oMessagePopover.isOpen()) {
605
+ oMessageButton.setVisible(true);
595
606
  // workaround to ensure that oMessageButton is rendered when openBy is called
596
607
  setTimeout(function() {
597
608
  oMessagePopover.openBy(oMessageButton);
598
609
  }, 0);
599
610
  }
611
+ return oRet;
600
612
  },
601
613
 
602
614
  _editDocument: function(oContext) {
@@ -647,12 +659,7 @@ sap.ui.define(
647
659
  };
648
660
  return that.editFlow
649
661
  .saveDocument(oContext, mParameters)
650
- .catch(function(err) {
651
- var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
652
- if (oMessageButton) {
653
- that._showMessagePopover(oMessageButton);
654
- }
655
- })
662
+ .catch(that._showMessagePopover.bind(that))
656
663
  .finally(function() {
657
664
  BusyLocker.unlock(oModel);
658
665
  });
@@ -664,19 +671,9 @@ sap.ui.define(
664
671
  return this.editFlow.cancelDocument(oContext, mParameters);
665
672
  },
666
673
 
667
- _toggleActiveDraft: function(oContext) {
668
- return this.editFlow.toggleDraftActive(oContext);
669
- },
670
-
671
674
  _applyDocument: function(oContext) {
672
675
  var that = this;
673
- return this.editFlow.applyDocument(oContext).catch(function(err) {
674
- Log.error(err);
675
- var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
676
- if (oMessageButton) {
677
- that._showMessagePopover(oMessageButton);
678
- }
679
- });
676
+ return this.editFlow.applyDocument(oContext).catch(that._showMessagePopover.bind(that));
680
677
  },
681
678
 
682
679
  _updateRelatedApps: function() {
@@ -1203,6 +1200,9 @@ sap.ui.define(
1203
1200
  if (oDataStateIndicator.getFilter()(null, oTable)) {
1204
1201
  oDataStateIndicator.fireDataStateChange();
1205
1202
  }
1203
+ // fire ModelContextChange on the message button whenever the table context changes
1204
+ var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
1205
+ oMessageButton.fireModelContextChange();
1206
1206
  },
1207
1207
 
1208
1208
  /**
@@ -1211,39 +1211,19 @@ sap.ui.define(
1211
1211
  * @param oView
1212
1212
  * @param {string} sActionName The name of the action to be called
1213
1213
  * @param {map} [mParameters] Contains the following attributes:
1214
- * @param {sap.ui.model.odata.v4.Context} [mParameters.contexts] Mandatory for a bound action, Either one context or an array with contexts for which the action shall be called
1215
- * @param {sap.ui.model.odata.v4.ODataModel} [mParameters.model] Mandatory for an unbound action, An instance of an OData v4 model
1214
+ * @param {sap.ui.model.odata.v4.Context} [mParameters.contexts] Mandatory for a bound action, either one context or an array with contexts for which the action shall be called
1215
+ * @param {sap.ui.model.odata.v4.ODataModel} [mParameters.model] Mandatory for an unbound action; an instance of an OData V4 model
1216
1216
  * @returns {Promise}
1217
1217
  * @ui5-restricted
1218
1218
  * @final
1219
1219
  */
1220
- onCallActionFromFooter: function(oView, sActionName, mParameters) {
1220
+ onCallAction: function(oView, sActionName, mParameters) {
1221
1221
  var oController = oView.getController();
1222
1222
  var that = oController;
1223
1223
  return oController.editFlow
1224
1224
  .invokeAction(sActionName, mParameters)
1225
- .then(function() {
1226
- // TODO: this logic should run for every action not only for the footer ones
1227
- var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
1228
- if (oMessageButton.isActive()) {
1229
- that._showMessagePopover(oMessageButton);
1230
- } else if (iMessages) {
1231
- that._oDelegateOnAfter = {
1232
- onAfterRendering: function(oEvent) {
1233
- that._showMessagePopover(oMessageButton);
1234
- oMessageButton.removeEventDelegate(that._oDelegateOnAfter);
1235
- delete that._oDelegateOnAfter;
1236
- }
1237
- };
1238
- oMessageButton.addEventDelegate(that._oDelegateOnAfter, that);
1239
- }
1240
- })
1241
- .catch(function(err) {
1242
- var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
1243
- if (oMessageButton) {
1244
- that._showMessagePopover(oMessageButton);
1245
- }
1246
- });
1225
+ .then(that._showMessagePopover.bind(that, undefined))
1226
+ .catch(that._showMessagePopover.bind(that));
1247
1227
  },
1248
1228
  onDataPointTitlePressed: function(oController, oSource, oManifestOutbound, sControlConfig, sCollectionPath) {
1249
1229
  oManifestOutbound = typeof oManifestOutbound === "string" ? JSON.parse(oManifestOutbound) : oManifestOutbound;
@@ -1270,11 +1250,16 @@ sap.ui.define(
1270
1250
  }
1271
1251
  },
1272
1252
  /**
1273
- * Triggers an outbound navigation on Chevron Press.
1253
+ * Triggers an outbound navigation when a user chooses the chevron.
1274
1254
  *
1275
1255
  * @param oController
1276
1256
  * @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
1257
+ <<<<<<< HEAD (2310ec [INTERNAL] Release notes for version 1.93.1)
1277
1258
  * @param {sap.ui.model.odata.v4.Context} oContext That contain the data for the target app
1259
+ =======
1260
+ * @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
1261
+ * @param {string} sCreatePath Create path when the chevron is created.
1262
+ >>>>>>> CHANGE (657783 [FIX] The message popover controls are now closed when leavi)
1278
1263
  * @returns {Promise} Promise which is resolved once the navigation is triggered (??? maybe only once finished?)
1279
1264
  */
1280
1265
  onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext) {