@sapui5/sap.suite.ui.generic.template 1.136.16 → 1.136.18

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 (27) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +2 -2
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +2 -2
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  7. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +1 -1
  8. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +1 -1
  9. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +1 -1
  10. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  11. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +2 -2
  12. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +2 -2
  13. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +1 -1
  14. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +1 -1
  15. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +1 -1
  16. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  17. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  18. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  19. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +29 -29
  20. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  21. package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +93 -55
  22. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +4 -1
  23. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +1 -1
  24. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +1 -1
  25. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +1 -1
  26. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  27. package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.136.16",
3
+ "version": "1.136.18",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.136.16</version>
10
+ <version>1.136.18</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -23,7 +23,7 @@ KPI_TOOLTIP_CRITICAL={0} {1}\nStatut\: risque
23
23
 
24
24
  KPI_DETERMINING_ERROR={0}\nImpossible de d\u00E9terminer la valeur
25
25
 
26
- KPI_DETERMINING_WARNING={0}\nDonn\u00E9es non valides ou introuvables
26
+ KPI_DETERMINING_WARNING={0}\nDonn\u00E9es invalides ou introuvables
27
27
 
28
28
  KPI_AUTHORIZATION_ISSUE=Probl\u00E8me d'autorisation
29
29
 
@@ -174,7 +174,7 @@ M_VISUAL_FILTER_HIDDEN_MEASURE=Impossible de charger le filtre visuel. La mesure
174
174
 
175
175
  REQUIRED_VH_FIELDS_OVERLAY_MESSAGE=Impossible de charger les donn\u00E9es car des champs obligatoires sont manquants. Contactez votre administrateur.
176
176
 
177
- INVALID_MEASURE_DONUT_MESSAGE=Mesure non valide trouv\u00E9e pour graphique en anneaux. La mesure doit \u00EAtre cumulative et positive.
177
+ INVALID_MEASURE_DONUT_MESSAGE=Mesure invalide trouv\u00E9e pour graphique en anneaux. La mesure doit \u00EAtre cumulative et positive.
178
178
 
179
179
  SHARE=Partager
180
180
 
@@ -63,9 +63,9 @@ VISUAL_FILTER_CHART_TYPE_Donut=Bagan Donat
63
63
 
64
64
  VISUAL_FILTER_SORTING=Pengurutan
65
65
 
66
- VISUAL_FILTER_SORTING_ASCENDING=Naik
66
+ VISUAL_FILTER_SORTING_ASCENDING=Menaik
67
67
 
68
- VISUAL_FILTER_SORTING_DESCENDING=Turun
68
+ VISUAL_FILTER_SORTING_DESCENDING=Menurun
69
69
 
70
70
  VISUAL_FILTER_LINE_CHART_TIME_LINE=Tampilkan
71
71
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.16"
11
+ "version": "1.136.18"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.16"
11
+ "version": "1.136.18"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -106,7 +106,7 @@ ST_CREATE_WITH_FILTERS=Mit Filtern anlegen
106
106
 
107
107
  ST_MANUAL_FILTER=Klassisch
108
108
 
109
- ST_EASY_FILTER=Einfacher Filter
109
+ ST_EASY_FILTER=Einfaches Filtern
110
110
 
111
111
 
112
112
 
@@ -5,7 +5,7 @@ DESCRIPTION=Rapport de liste
5
5
 
6
6
  ALL_OBJECTS=Tous
7
7
 
8
- ALL_OBJECTS_HIDING_DRAFT=Toutes (les versions pr\u00E9liminaires masqu\u00E9es)
8
+ ALL_OBJECTS_HIDING_DRAFT=Tous (versions pr\u00E9liminaires masqu\u00E9es)
9
9
 
10
10
  UNCHANGED=Non modifi\u00E9
11
11
 
@@ -96,7 +96,7 @@ LOCKED_OBJECT_FILTER=Dikunci oleh Pengguna Lain
96
96
 
97
97
  UNSAVED_CHANGES=Perubahan Belum Disimpan
98
98
 
99
- UNSAVED_CHANGES_FILTER=Perubahan oleh Pengguna Lain yang Belum Disimpan
99
+ UNSAVED_CHANGES_FILTER=Perubahan yang Belum Disimpan oleh Pengguna Lain
100
100
 
101
101
  SHARE=Bagikan
102
102
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.16"
11
+ "version": "1.136.18"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1457,7 +1457,7 @@ sap.ui.define([
1457
1457
  return null;
1458
1458
  }
1459
1459
  if (controlHelper.isSmartField(oControl)){ // check whether the SmartField is the correct target for focussing
1460
- return controlHelper.getSmartFieldIsFocussableForInputPromise(oControl).then(function(bIsFocussable){
1460
+ return controlHelper.getSmartFieldIsFocussableForInputPromise(oControl, true).then(function(bIsFocussable){
1461
1461
  return bIsFocussable && oControl; // If the SmartField has turned out to be focussable take it. Otherwise no need to investigate the subtree below it.
1462
1462
  });
1463
1463
  }
@@ -1517,7 +1517,7 @@ sap.ui.define([
1517
1517
  //set the focus on the control passed by application
1518
1518
  if (controlHelper.isSmartField(oFocusControl)) {
1519
1519
  // check whether the SmartField is the correct target for focussing
1520
- controlHelper.getSmartFieldIsFocussableForInputPromise(oFocusControl).then(function (bIsFocusable) {
1520
+ controlHelper.getSmartFieldIsFocussableForInputPromise(oFocusControl, true).then(function (bIsFocusable) {
1521
1521
  if (bIsFocusable) {
1522
1522
  controlHelper.focusUI5Control(oFocusControl);
1523
1523
  } else {
@@ -17,9 +17,9 @@ DRAFT_VERSION=Entwurf
17
17
 
18
18
  SAVE=Sichern
19
19
 
20
- SAVE_AND_EDIT=Sichern und Bearbeiten
20
+ SAVE_AND_EDIT=Sichern und bearbeiten
21
21
 
22
- SAVE_AND_NEXT=Sichern und Weiter
22
+ SAVE_AND_NEXT=Sichern und weiter
23
23
 
24
24
  VALIDATE_DRAFT=Validieren
25
25
 
@@ -92,7 +92,7 @@ CONTACT_INFO=Informasi Kontak
92
92
 
93
93
  CONTACT_OPTION=Microsoft Teams
94
94
 
95
- CONTACT_JOB_TITLE=Judul Pekerjaan
95
+ CONTACT_JOB_TITLE=Jabatan Pekerjaan
96
96
 
97
97
  CONTACT_DEPARTMENT=Departemen
98
98
 
@@ -17,7 +17,7 @@ DRAFT_VERSION=Esbo\u00E7o
17
17
 
18
18
  SAVE=Salvar
19
19
 
20
- SAVE_AND_EDIT=Salvar e editar
20
+ SAVE_AND_EDIT=Gravar e editar
21
21
 
22
22
  SAVE_AND_NEXT=Gravar e seguinte
23
23
 
@@ -19,7 +19,7 @@ SAVE=\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438
19
19
 
20
20
  SAVE_AND_EDIT=\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438
21
21
 
22
- SAVE_AND_NEXT=\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456 \u043F\u0440\u043E\u0434\u043E\u0432\u0436\u0438\u0442\u0438
22
+ SAVE_AND_NEXT=\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0442\u0430 \u0434\u0430\u043B\u0456
23
23
 
24
24
  VALIDATE_DRAFT=\u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438
25
25
 
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.16"
9
+ "version": "1.136.18"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.16"
9
+ "version": "1.136.18"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.16"
9
+ "version": "1.136.18"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -1,29 +1,29 @@
1
1
  sap.ui.define([
2
- "sap/ui/dom/getFirstEditableInput",
2
+ "sap/ui/dom/getFirstEditableInput",
3
3
  "sap/suite/ui/generic/template/genericUtilities/FeLogger",
4
4
  "sap/ui/core/Element",
5
5
  "sap/ui/table/plugins/MultiSelectionPlugin"
6
6
  ], function(getFirstEditableInput, FeLogger, Element, MultiSelectionPlugin) {
7
7
  "use strict";
8
-
8
+
9
9
  var oFeLogger = new FeLogger("genericUtilities.controlHelper");
10
10
  var oLogger = oFeLogger.getLogger();
11
-
11
+
12
12
  var byId = Element.getElementById;
13
-
13
+
14
14
  function isControlOfType(sPathToType, oControl){
15
15
  var FNClass = sap.ui.require(sPathToType);
16
16
  return typeof FNClass === "function" && (oControl instanceof FNClass);
17
17
  }
18
-
18
+
19
19
  function getUI5ControlForDomElement(oDom){
20
20
  for (; oDom; oDom = oDom.parentNode) {
21
21
  if (oDom.hasAttribute && oDom.hasAttribute("data-sap-ui")) {
22
22
  return byId(oDom.id);
23
23
  }
24
- }
24
+ }
25
25
  }
26
-
26
+
27
27
  function focusUI5Control(oControl, oFocusInfo){
28
28
  if (oControl && oControl.focus) {
29
29
  oLogger.debug("Set focus on control with id " + oControl.getId());
@@ -50,9 +50,9 @@ sap.ui.define([
50
50
  if (oTest !== oControl){
51
51
  oLogger.warning(oCurrentFocus ? ("Focus is now on control with id " + oCurrentFocus.getId()) : "There is no focus now");
52
52
  }
53
- }
53
+ }
54
54
  }
55
-
55
+
56
56
  function focusDom(oDom, oFocusInfo){
57
57
  var oUi5Control = getUI5ControlForDomElement(oDom);
58
58
  focusUI5Control(oUi5Control, oFocusInfo);
@@ -64,12 +64,12 @@ sap.ui.define([
64
64
  }
65
65
 
66
66
  // returns a Promise that resolves to the boolean information whether the SmartField is a possible focus target for input.
67
- function getSmartFieldIsFocussableForInputPromise(oSmartField) {
67
+ function getSmartFieldIsFocussableForInputPromise(oSmartField, isSmartForm) {
68
68
  return oSmartField._getComputedMetadata().then(function () {
69
69
  return (oSmartField.getMode() === "edit") && (oSmartField._getICRenderedPromise() || Promise.resolve());
70
70
  }).then(function () {
71
- var oFirstFocusableInput = !oSmartField._bEdmBoolDetected && getFirstEditableInput(oSmartField.getDomRef());
72
- return !(!oFirstFocusableInput || oFirstFocusableInput.type === "checkbox");
71
+ var oFirstFocusableInput = (!oSmartField._bEdmBoolDetected || isSmartForm) && getFirstEditableInput(oSmartField.getDomRef());
72
+ return !(!oFirstFocusableInput || (oFirstFocusableInput.type === "checkbox" && !isSmartForm));
73
73
  }).catch(function () {
74
74
  return false;
75
75
  });
@@ -80,12 +80,12 @@ sap.ui.define([
80
80
  function getControlWithFocus(){
81
81
  return getUI5ControlForDomElement(document.activeElement);
82
82
  }
83
-
83
+
84
84
  // Returns the parent of a given sap.ui.core.Element, but considers that for Components the parent is to be found via the oContainer property.
85
85
  function getParent(oElement){
86
86
  return oElement.getParent() || oElement.oContainer;
87
87
  }
88
-
88
+
89
89
  // If oChild is identified to be invisible, null is returned. Otherwise its parent is returned.
90
90
  // If the parent does not exist a faulty value is returned.
91
91
  // This is a heuristic method.
@@ -111,7 +111,7 @@ sap.ui.define([
111
111
  }
112
112
  return vRet;
113
113
  }
114
-
114
+
115
115
  // Return a list of all children of the given control (in the 'correct' order). Only implemented for certain control types.
116
116
  // For the other control types it returns null or an empty array depending on bAlwaysReturnAList.
117
117
  function getChildren(oControl, bAlwaysReturnAList){
@@ -125,7 +125,7 @@ sap.ui.define([
125
125
  return oControl.getBlocks().concat(oControl.getMoreBlocks());
126
126
  }
127
127
  if (isControlOfType("sap/ui/comp/smartform/Group", oControl)){
128
- return oControl.getFormElements();
128
+ return oControl.getFormElements();
129
129
  }
130
130
  if (isControlOfType("sap/ui/table/Column", oControl)){
131
131
  var aRet = oControl.getMultiLabels();
@@ -133,11 +133,11 @@ sap.ui.define([
133
133
  if (oLabel){
134
134
  aRet.push(oLabel);
135
135
  }
136
- return aRet;
137
- }
136
+ return aRet;
137
+ }
138
138
  return bAlwaysReturnAList ? [] : null;
139
139
  }
140
-
140
+
141
141
  // Sorter that compares the position of two child controls which have a common parent.
142
142
  // Returns a positive integer when oChild1 is larger, a negative number if oChild2 is larger, and 0 if they are identical.
143
143
  // Depends on getChildren() being implemented for commonParent. If this is not the case, at least a reproducable order is guaranteed.
@@ -158,13 +158,13 @@ sap.ui.define([
158
158
  }
159
159
  if (iPositionCompare & Node.DOCUMENT_POSITION_FOLLOWING){
160
160
  return -1;
161
- }
161
+ }
162
162
  }
163
163
  return 1 - 2 * (!oDomRef1 === !oDomRef2 ? oChild1.getId() < oChild2.getId() : !oDomRef2); // if we cannot determine a reasonable order we still want to have a reproducable order. Note that elements with DomRef must clearly be separated from those without.
164
164
  }
165
165
  return (iPos1 >= 0 && iPos2 >= 0) ? (iPos1 - iPos2) : (iPos2 - iPos1); // if only one child has been identified in the list of children it takes precedence.
166
166
  }
167
-
167
+
168
168
  // This function defines which instances of sap.ui.core.Element are relevant for investigation (Currently used in fnSearchInTree).
169
169
  // They must posess a property 'visible' (which is guaranteed for all instances of sap.ui.core.Control) which is true.
170
170
  // If they have a property 'enabled' this must be true as well.
@@ -174,7 +174,7 @@ sap.ui.define([
174
174
  return checkForRelevance(oCell);
175
175
  }) : (typeof oElement.getVisible === "function" && oElement.getVisible() && (typeof oElement.getEnabled !== "function" || oElement.getEnabled()));
176
176
  }
177
-
177
+
178
178
  // This function allows a depth-first search in an element tree starting with root oElement
179
179
  // Thereby, the following logic is applied
180
180
  // - Children of an element are determined by function getChildren in this class. If this provides an empty array method findElements of the element is used
@@ -186,14 +186,14 @@ sap.ui.define([
186
186
  // Note that mAlreadyAnalyzed will be updated by this function
187
187
  // fnHandleElement(oElement) is a function that will be called on all relevant elements of the tree.
188
188
  // This function can work asynchronously (i.e. return a Promise) or synchronously (i.e. return something which is not a Promise) on a case-by-case basis.
189
- // In the second case the return value will be considered as the result of the function. In the first case the value the Promise resolves to will be considered as the result.
189
+ // In the second case the return value will be considered as the result of the function. In the first case the value the Promise resolves to will be considered as the result.
190
190
  // If the result is a truthy value for one element this value is considered as the result of fnSearchInTree and the processing is stopped.
191
191
  // fnSearchInTree returns this result synchronously if all calls of fnHandleElement which have been performed until then have worked synchronously.
192
192
  // If the result of fnHandleElement is faulty the depth-first search of the tree proceeds. Thereby the processing of the subtree of oElement is
193
193
  // skipped if the result was exactly false. For other faulty values the subtree will be processed next.
194
194
  // Note that this process will never work on two elements in parallel. If the processing of one element is asynchronous the process is interrupted until
195
195
  // the result of this step is available. Only then the next element will be analyzed.
196
- // If fnHandleElement never results in a truthy value then fnSearchInTree results in null.
196
+ // If fnHandleElement never results in a truthy value then fnSearchInTree results in null.
197
197
  function fnSearchInTree(mAlreadyAnalyzed, oElement, fnHandleElement){
198
198
  mAlreadyAnalyzed = mAlreadyAnalyzed || Object.create(null);
199
199
  var sId = oElement.getId();
@@ -211,7 +211,7 @@ sap.ui.define([
211
211
  if (!aChildren){ // if getChildren does not care for the control type of oElement
212
212
  aChildren = oElement.findElements(false);
213
213
  aChildren.sort(fnSortChildControls.bind(null, oElement));
214
- }
214
+ }
215
215
  aChildren.some(function(oChild){
216
216
  vResult = fnSearchInTree(mAlreadyAnalyzed, oChild, fnHandleElement);
217
217
  return vResult; // If vResult is truthy it is either a Promise (which makes the processing asynchronous) or the result of fnSearchInTree. In both cases we should stop now.
@@ -231,12 +231,12 @@ sap.ui.define([
231
231
  }
232
232
  // When coming here we have synchronously either found a node with a truthy result or have processed the whole tree without finding any truthy result
233
233
  mAlreadyAnalyzed[sId] = 2;
234
- return vResult || null;
234
+ return vResult || null;
235
235
  }
236
236
 
237
237
  /**
238
238
  * Returns the selection plugin for the given UI table
239
- * @param {sap.ui.table.Table} oUiTable
239
+ * @param {sap.ui.table.Table} oUiTable
240
240
  * @returns {sap.ui.table.plugins.MultiSelectionPlugin|undefined}
241
241
  */
242
242
  function fnGetSelectionPluginForUITable (oUiTable) {
@@ -284,10 +284,10 @@ sap.ui.define([
284
284
  searchInTree: fnSearchInTree.bind(null, null),
285
285
  getSelectionPluginForUITable: fnGetSelectionPluginForUITable
286
286
  };
287
-
287
+
288
288
  oControlHelper.isTable = function(oControl){
289
289
  return oControlHelper.isSmartTable(oControl) || oControlHelper.isUiTable(oControl) || oControlHelper.isMTable(oControl);
290
290
  };
291
-
291
+
292
292
  return oControlHelper;
293
293
  });
@@ -964,7 +964,7 @@ sap.ui.define([
964
964
  * @public
965
965
  * @extends sap.ui.core.UIComponent
966
966
  * @author SAP SE
967
- * @version 1.136.16
967
+ * @version 1.136.18
968
968
  * @name sap.suite.ui.generic.template.lib.AppComponent
969
969
  */
970
970
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -333,67 +333,105 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
333
333
  }
334
334
 
335
335
  /*
336
- Allows direct edit on the entires on the list, unlike the method 'edit'above, this method first edit the entry with preserveChanges as true
337
- If the response indicates an unsaved change or locked record, a corresponding dialog is shown to proceed or cancel with the edit.
338
- */
339
- function directEdit(oTransactionController, sEntitySet, sBindingPath, oModel, oApplication, oCommonUtils, oViewDependencyHelper, oViewProxy, bOpenInEditMode){
336
+ * Initiates editing of a list entry directly (without navigating to the object page first).
337
+ * Unlike the 'edit' method above, the first editEntity call uses preserveChanges=true.
338
+ * If the backend responds with a 409 (conflict) the DraftAdministrativeData is read to
339
+ * distinguish between a locked record and a record with unsaved changes by another user.
340
+ * A corresponding dialog is shown to let the user decide how to proceed.
341
+ *
342
+ * @param {object} oTransactionController - transaction controller providing editEntity
343
+ * @param {string} sEntitySet - name of the entity set
344
+ * @param {object} oBindingContext - UI5 Context of the row being edited;
345
+ * the OData model and binding path are derived
346
+ * from it via .getModel() / .getPath()
347
+ * @param {object} oApplication - application proxy (busy helper, component utils, …)
348
+ * @param {string} sAppId - ID of the AppComponent; used as the localStorage cache
349
+ * key for the content-id batch optimisation
350
+ * @param {object} oCommonUtils - common utilities (getText, …)
351
+ * @param {object} oViewDependencyHelper - used to mark the root page as dirty
352
+ * @param {object} oViewProxy - used for navigateUp on cancellation
353
+ * @param {boolean} bOpenInEditMode - whether the page was opened directly in edit mode
354
+ */
355
+ function directEdit(oTransactionController, sEntitySet, oBindingContext, oApplication, sAppId, oCommonUtils, oViewDependencyHelper, oViewProxy, bOpenInEditMode){
340
356
  var oDraftContext = oTransactionController.getDraftController().getDraftContext();
341
- var oPromise = new Promise(function(resolve,reject) {
342
- oModel.createBindingContext(sBindingPath, null, null, function(oBindingContext){
343
- if (oDraftContext.isDraftEnabled(sEntitySet)) {
344
- oTransactionController.editEntity(oBindingContext, true).then(function(oResponse) {
345
- oBindingContext.getModel().invalidateEntry(oBindingContext);
346
- oViewDependencyHelper.setRootPageToDirty();
347
- resolve({
348
- context: oResponse.context
349
- });
350
- }, function(oResponse) {
351
- if (oResponse && oResponse.response && oResponse.response.statusCode === "409") {
352
- //remove transient message associated with rc 409 in order to prevent message pop-up
353
- oApplication.removeTransientMessages();
354
- fnReadDraftAdministrativeData(oModel, sBindingPath, oApplication.getBusyHelper()).then(
355
- function(oResponse) {
356
- if (oResponse.DraftAdministrativeData.InProcessByUser) {
357
- reject({
358
- lockedByUser: oResponse.DraftAdministrativeData.InProcessByUserDescription || oResponse.DraftAdministrativeData.InProcessByUser
359
- });
360
- } else { //unsaved changes
361
- var editConfirmation = function(){
362
- var oUnsavedChangesEditPromise = oTransactionController.editEntity(oBindingContext, false).then(function(oResponse){
363
- oBindingContext.getModel().invalidateEntry(oBindingContext);
364
- oViewDependencyHelper.setRootPageToDirty();
365
- resolve({
366
- context: oResponse.context
367
- });
368
- });
369
- oApplication.getBusyHelper().setBusy(oUnsavedChangesEditPromise, true);
370
- };
371
- var editRejection = reject({
372
- cancelled: true
373
- });
374
- var unSavedChangesDialogPromise = fnUnsavedChangesDialog(undefined, oResponse.DraftAdministrativeData,oCommonUtils, oViewProxy, bOpenInEditMode);
375
- unSavedChangesDialogPromise.then(editConfirmation,editRejection);
376
- }
377
- },
378
- function(oResponse) {
379
- // DraftAdminData read failed
357
+
358
+ if (!oDraftContext.isDraftEnabled(sEntitySet)) {
359
+ return Promise.resolve({ context: oBindingContext });
360
+ }
361
+
362
+ var oModel = oBindingContext.getModel();
363
+ // Fetch sRootExpand for the content-id batch optimisation.
364
+ // getRootExpand is intentionally not provided: directEdit is always invoked from
365
+ // the List Report before the Object Page is active, so getRootExpand is not yet
366
+ // available. CacheHelper falls back to the localStorage cache, which is still
367
+ // much faster than fetching expands in a separate backend request.
368
+ var oInfoForContentIdPromise = CacheHelper.getInfoForContentIdPromise(sEntitySet, oModel, sAppId);
369
+
370
+ var oRet = oInfoForContentIdPromise.then(function(oInfoObject) {
371
+ var sRootExpand = oInfoObject.contentIdRequestPossible ? oInfoObject.parametersForContentIdRequest.sRootExpand : null;
372
+
373
+ return new Promise(function(resolve, reject) {
374
+ var oFirstEditPromise = oTransactionController.editEntity(oBindingContext, true, sRootExpand);
375
+ // Track the busy state against the individual network request so the busy
376
+ // indicator remains active for exactly as long as the request is in flight.
377
+ oApplication.getBusyHelper().setBusy(oFirstEditPromise, true);
378
+ oFirstEditPromise.then(function(oResponse) {
379
+ oModel.invalidateEntry(oBindingContext);
380
+ oViewDependencyHelper.setRootPageToDirty();
381
+ resolve({ context: oResponse.context });
382
+ }, function(oResponse) {
383
+ if (oResponse && oResponse.response && oResponse.response.statusCode === "409") {
384
+ //remove transient message associated with rc 409 in order to prevent message pop-up
385
+ oApplication.removeTransientMessages();
386
+ fnReadDraftAdministrativeData(oModel, oBindingContext.getPath(), oApplication.getBusyHelper()).then(
387
+ function(oResponse) {
388
+ if (oResponse.DraftAdministrativeData.InProcessByUser) {
380
389
  reject({
381
- draftAdminReadResponse: oResponse
390
+ lockedByUser: oResponse.DraftAdministrativeData.InProcessByUserDescription || oResponse.DraftAdministrativeData.InProcessByUser
382
391
  });
383
- });
384
- oApplication.getBusyHelper().setBusy(oPromise, true);
385
- } else {
386
- reject(oResponse);
387
- }
388
- });
389
- } else {
390
- return resolve({
391
- context: oBindingContext
392
+ } else { //unsaved changes
393
+ var editConfirmation = function() {
394
+ // Re-run editEntity without preserveChanges so the
395
+ // unsaved changes of another user are overwritten.
396
+ var oUnsavedChangesEditPromise = oTransactionController.editEntity(oBindingContext, false, sRootExpand).then(function(oResponse) {
397
+ oModel.invalidateEntry(oBindingContext);
398
+ oViewDependencyHelper.setRootPageToDirty();
399
+ resolve({ context: oResponse.context });
400
+ });
401
+ oApplication.getBusyHelper().setBusy(oUnsavedChangesEditPromise, true);
402
+ };
403
+ // editRejection is passed as the rejection handler of Promise.then(),
404
+ // so it must be a function reference; calling reject() inline here
405
+ // would execute it immediately instead of on dialog cancellation.
406
+ var editRejection = function() { reject({ cancelled: true }); };
407
+ var unSavedChangesDialogPromise = fnUnsavedChangesDialog(undefined, oResponse.DraftAdministrativeData, oCommonUtils, oViewProxy, bOpenInEditMode);
408
+ unSavedChangesDialogPromise.then(editConfirmation, editRejection);
409
+ }
410
+ },
411
+ function(oResponse) {
412
+ // DraftAdminData read failed
413
+ reject({ draftAdminReadResponse: oResponse });
414
+ }
415
+ );
416
+ } else {
417
+ reject(oResponse);
418
+ }
392
419
  });
393
- }
394
420
  });
395
421
  });
396
- return oPromise;
422
+
423
+ // Ensure the active context is registered in ContextBookkeeping before the edit
424
+ // resolves. This caches the draft sibling path so subsequent navigation can use
425
+ // the cached value without an additional /SiblingEntity request.
426
+ // editingStarted() notifies all listeners (e.g. the message button helper) that
427
+ // the editing phase has begun for this context.
428
+ var bContextRegistered = oApplication.checkContextData(oBindingContext);
429
+ if (!bContextRegistered) {
430
+ oApplication.registerContext(oBindingContext, 1, sEntitySet);
431
+ }
432
+ oApplication.editingStarted(oBindingContext, oRet);
433
+
434
+ return oRet;
397
435
  }
398
436
 
399
437
  function deleteEntity(oDraftController, fnExecuteDelete, oApplicationProxy, oContext, bIsActiveEntity, sActionType){
@@ -1677,7 +1677,10 @@ sap.ui.define(["sap/ui/base/Object",
1677
1677
  var bOpenInEditMode = !!oComponent.getEditFlow && oComponent.getEditFlow() === "direct";
1678
1678
  if (bOpenInEditMode){
1679
1679
  var sEntitySet = oTable.getEntitySet();
1680
- var oEditPromise = CRUDHelper.directEdit(oServices.oTransactionController, sEntitySet, oBindingContext.sPath, oBindingContext.getModel(), oServices.oApplication, oCommonUtils, oServices.oViewDependencyHelper, oViewProxy, bOpenInEditMode);
1680
+ // oBindingContext is passed directly; the OData model and binding path are resolved inside directEdit.
1681
+ // sAppId is derived here because oController is not accessible inside CRUDHelper.
1682
+ var sAppId = oComponent.getAppComponent().getId();
1683
+ var oEditPromise = CRUDHelper.directEdit(oServices.oTransactionController, sEntitySet, oBindingContext, oServices.oApplication, sAppId, oCommonUtils, oServices.oViewDependencyHelper, oViewProxy, bOpenInEditMode);
1681
1684
  oEditPromise.then(function(oResult){
1682
1685
  oCommonUtils.navigateFromListItem(oResult.context, bReplace, true);
1683
1686
  }, function(oError){
@@ -51,7 +51,7 @@ ST_DRAFT_OWNER=par {0}
51
51
 
52
52
  ST_DRAFT_ANOTHER_USER=par un autre utilisateur
53
53
 
54
- DATA_PASTE_ERROR_MESSAGE=Impossible de coller. {0} \u00E9l\u00E9ments contiennent des donn\u00E9es non valides.
54
+ DATA_PASTE_ERROR_MESSAGE=Impossible de coller. {0} \u00E9l\u00E9ments contiennent des donn\u00E9es invalides.
55
55
 
56
56
  DATA_PASTE_ERROR_CORRECTION_MESSAGE=Veuillez corriger les valeurs indiqu\u00E9es ci-dessous dans votre fichier source.
57
57
 
@@ -55,7 +55,7 @@ DATA_PASTE_ERROR_MESSAGE=Lijepljenje nije mogu\u0107e. {0} stavki sadr\u017Ei ne
55
55
 
56
56
  DATA_PASTE_ERROR_CORRECTION_MESSAGE=Ispravite ni\u017Ee navedene vrijednosti u svojoj izvornoj datoteci.
57
57
 
58
- DATA_PASTE_ERROR_CORRECTION_NOTE=(Napomena\: red/stupac odnose se na poziciju u skupu podataka koji ste kopirali.)
58
+ DATA_PASTE_ERROR_CORRECTION_NOTE=(Bilje\u0161ka\: red/stupac odnose se na poziciju u skupu podataka koji ste kopirali.)
59
59
 
60
60
  DATA_PASTE_UNSUPPORTED_FORMAT_MESSAGE=Lijepljenje nije mogu\u0107e za ovu tabelu.
61
61
 
@@ -55,7 +55,7 @@ DATA_PASTE_ERROR_MESSAGE=Plakken niet mogelijk. {0} posities bevatten ongeldige
55
55
 
56
56
  DATA_PASTE_ERROR_CORRECTION_MESSAGE=Corrigeer de waarden die hieronder worden vermeld in uw bronbestand.
57
57
 
58
- DATA_PASTE_ERROR_CORRECTION_NOTE=(Opmerking\: rij/kolom verwijst naar de positie in de door u gekopieerde gegevensset.)
58
+ DATA_PASTE_ERROR_CORRECTION_NOTE=(Opmerking\: regel/kolom verwijst naar de positie in de door u gekopieerde gegevensset.)
59
59
 
60
60
  DATA_PASTE_UNSUPPORTED_FORMAT_MESSAGE=Plakken is niet beschikbaar voor deze tabel.
61
61
 
@@ -3206,7 +3206,7 @@ sap.ui.define(["sap/ui/base/Object",
3206
3206
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3207
3207
  * @public
3208
3208
  * @extends sap.ui.base.Object
3209
- * @version 1.136.16
3209
+ * @version 1.136.18
3210
3210
  * @since 1.30.0
3211
3211
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3212
3212
  */
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  interfaces: [],
67
67
  controls: [],
68
68
  elements: [],
69
- version: "1.136.16",
69
+ version: "1.136.18",
70
70
  extensions: {
71
71
  //Configuration used for rule loading of Support Assistant
72
72
  "sap.ui.support": {