@sapui5/sap.fe.templates 1.93.3 → 1.96.2

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 (90) hide show
  1. package/package.json +2 -2
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
  4. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +31 -3
  5. package/src/sap/fe/templates/ListReport/ListReport.view.xml +7 -5
  6. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +181 -197
  7. package/src/sap/fe/templates/ListReport/manifest.json +11 -1
  8. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +1 -1
  9. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +123 -26
  10. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
  11. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +35 -99
  12. package/src/sap/fe/templates/ObjectPage/Component.js +0 -6
  13. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -3
  14. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +169 -165
  15. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +220 -157
  16. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
  17. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
  18. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
  19. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +22 -1
  20. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +16 -14
  21. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +20 -8
  22. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +14 -19
  23. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
  24. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
  25. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
  26. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -2
  27. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +8 -4
  28. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +60 -112
  29. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +62 -70
  30. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +9 -1
  31. package/src/sap/fe/templates/TableScroller.js +61 -0
  32. package/src/sap/fe/templates/controls/Chart.fragment.xml +11 -14
  33. package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +1 -1
  34. package/src/sap/fe/templates/controls/Table.fragment.xml +1 -0
  35. package/src/sap/fe/templates/library.js +1 -1
  36. package/src/sap/fe/templates/messagebundle.properties +1 -1
  37. package/src/sap/fe/templates/messagebundle_ar.properties +9 -5
  38. package/src/sap/fe/templates/messagebundle_bg.properties +8 -4
  39. package/src/sap/fe/templates/messagebundle_ca.properties +8 -4
  40. package/src/sap/fe/templates/messagebundle_cs.properties +7 -3
  41. package/src/sap/fe/templates/messagebundle_cy.properties +8 -4
  42. package/src/sap/fe/templates/messagebundle_da.properties +9 -5
  43. package/src/sap/fe/templates/messagebundle_de.properties +8 -4
  44. package/src/sap/fe/templates/messagebundle_el.properties +8 -4
  45. package/src/sap/fe/templates/messagebundle_en.properties +7 -3
  46. package/src/sap/fe/templates/messagebundle_en_GB.properties +7 -3
  47. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +7 -3
  48. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
  49. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
  50. package/src/sap/fe/templates/messagebundle_es.properties +8 -4
  51. package/src/sap/fe/templates/messagebundle_es_MX.properties +8 -4
  52. package/src/sap/fe/templates/messagebundle_et.properties +7 -3
  53. package/src/sap/fe/templates/messagebundle_fi.properties +8 -4
  54. package/src/sap/fe/templates/messagebundle_fr.properties +9 -5
  55. package/src/sap/fe/templates/messagebundle_fr_CA.properties +8 -4
  56. package/src/sap/fe/templates/messagebundle_hi.properties +8 -4
  57. package/src/sap/fe/templates/messagebundle_hr.properties +8 -4
  58. package/src/sap/fe/templates/messagebundle_hu.properties +9 -5
  59. package/src/sap/fe/templates/messagebundle_id.properties +10 -6
  60. package/src/sap/fe/templates/messagebundle_it.properties +8 -4
  61. package/src/sap/fe/templates/messagebundle_iw.properties +8 -4
  62. package/src/sap/fe/templates/messagebundle_ja.properties +8 -4
  63. package/src/sap/fe/templates/messagebundle_kk.properties +8 -4
  64. package/src/sap/fe/templates/messagebundle_ko.properties +8 -4
  65. package/src/sap/fe/templates/messagebundle_lt.properties +8 -4
  66. package/src/sap/fe/templates/messagebundle_lv.properties +8 -4
  67. package/src/sap/fe/templates/messagebundle_ms.properties +8 -4
  68. package/src/sap/fe/templates/messagebundle_nl.properties +8 -4
  69. package/src/sap/fe/templates/messagebundle_no.properties +9 -5
  70. package/src/sap/fe/templates/messagebundle_pl.properties +8 -4
  71. package/src/sap/fe/templates/messagebundle_pt.properties +8 -4
  72. package/src/sap/fe/templates/messagebundle_pt_PT.properties +8 -4
  73. package/src/sap/fe/templates/messagebundle_ro.properties +8 -4
  74. package/src/sap/fe/templates/messagebundle_ru.properties +9 -5
  75. package/src/sap/fe/templates/messagebundle_sh.properties +8 -4
  76. package/src/sap/fe/templates/messagebundle_sk.properties +8 -4
  77. package/src/sap/fe/templates/messagebundle_sl.properties +8 -4
  78. package/src/sap/fe/templates/messagebundle_sv.properties +8 -4
  79. package/src/sap/fe/templates/messagebundle_th.properties +9 -5
  80. package/src/sap/fe/templates/messagebundle_tr.properties +7 -3
  81. package/src/sap/fe/templates/messagebundle_uk.properties +7 -3
  82. package/src/sap/fe/templates/messagebundle_vi.properties +8 -4
  83. package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -5
  84. package/src/sap/fe/templates/messagebundle_zh_TW.properties +8 -4
  85. package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
  86. package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
  87. package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
  88. package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
  89. package/src/sap/fe/templates/controls/Paginator.control.xml +0 -22
  90. package/src/sap/fe/templates/controls/Paginator.js +0 -173
@@ -6,7 +6,6 @@ sap.ui.define(
6
6
  [
7
7
  "sap/fe/core/PageController",
8
8
  "sap/fe/core/controllerextensions/InternalRouting",
9
- "./overrides/Routing",
10
9
  "./overrides/InternalRouting",
11
10
  "sap/fe/core/controllerextensions/SideEffects",
12
11
  "sap/fe/core/controllerextensions/EditFlow",
@@ -37,12 +36,16 @@ sap.ui.define(
37
36
  "sap/fe/core/controllerextensions/Share",
38
37
  "./overrides/Share",
39
38
  "sap/fe/macros/DelegateUtil",
40
- "sap/fe/macros/CommonHelper"
39
+ "sap/fe/macros/CommonHelper",
40
+ "sap/fe/templates/TableScroller",
41
+ "sap/ui/model/json/JSONModel",
42
+ "sap/fe/core/controllerextensions/Paginator",
43
+ "./overrides/Paginator",
44
+ "sap/fe/core/controllerextensions/Placeholder"
41
45
  ],
42
46
  function(
43
47
  PageController,
44
48
  InternalRouting,
45
- RoutingOverride,
46
49
  InternalRoutingOverride,
47
50
  SideEffects,
48
51
  EditFlow,
@@ -73,7 +76,12 @@ sap.ui.define(
73
76
  Share,
74
77
  ShareOverrides,
75
78
  DelegateUtil,
76
- CommonHelper
79
+ CommonHelper,
80
+ TableScroller,
81
+ JSONModel,
82
+ Paginator,
83
+ PaginatorOverride,
84
+ Placeholder
77
85
  ) {
78
86
  "use strict";
79
87
 
@@ -91,21 +99,22 @@ sap.ui.define(
91
99
  }
92
100
  }
93
101
  },
102
+ placeholder: Placeholder,
94
103
  sideEffects: SideEffects,
95
104
  editFlow: EditFlow,
96
105
  share: Share.override(ShareOverrides),
97
106
  _editFlow: InternalEditFlow.override(EditFlowOverrides),
98
107
  _routing: InternalRouting.override(InternalRoutingOverride),
108
+ paginator: Paginator.override(PaginatorOverride),
99
109
  messageHandler: MessageHandler.override(MessageHandlerOverride),
100
110
  intentBasedNavigation: IntentBasedNavigation.override(IntentBasedNavigationOverride),
101
111
  _intentBasedNavigation: InternalIntentBasedNavigation.override({
102
112
  getNavigationMode: function() {
103
113
  var bIsStickyEditMode =
104
114
  this._oView.getController().getStickyEditMode && this._oView.getController().getStickyEditMode();
105
- return bIsStickyEditMode ? "explace" : "inplace";
115
+ return bIsStickyEditMode ? "explace" : undefined;
106
116
  }
107
117
  }),
108
- routing: Routing.override(RoutingOverride),
109
118
  viewState: ViewState.override(ViewStateOverrides),
110
119
  pageReady: PageReady.override({
111
120
  isContextExpected: function() {
@@ -142,7 +151,7 @@ sap.ui.define(
142
151
  items: null
143
152
  });
144
153
  oInternalModelContext.setProperty("batchGroups", this._getBatchGroupsForView());
145
-
154
+ oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
146
155
  if (oObjectPage.getEnableLazyLoading()) {
147
156
  //Attaching the event to make the subsection context binding active when it is visible.
148
157
  oObjectPage.attachEvent("subSectionEnteredViewPort", this._handleSubSectionEnteredViewPort.bind(this));
@@ -170,6 +179,11 @@ sap.ui.define(
170
179
  _getTableBinding: function(oTable) {
171
180
  return oTable && oTable.getRowBinding();
172
181
  },
182
+
183
+ onBeforeRendering: function() {
184
+ PageController.prototype.onBeforeRendering.apply(this);
185
+ },
186
+
173
187
  onAfterRendering: function(oEvent) {
174
188
  var that = this;
175
189
  this.getView()
@@ -191,7 +205,9 @@ sap.ui.define(
191
205
  oObjectPage = this.byId("fe::ObjectPage"),
192
206
  oBinding = mParameters.listBinding,
193
207
  oInternalModelContext = that.getView().getBindingContext("internal"),
194
- aBatchGroups = oInternalModelContext.getProperty("batchGroups");
208
+ aBatchGroups = oInternalModelContext.getProperty("batchGroups"),
209
+ iViewLevel = this.getView().getViewData().viewLevel;
210
+
195
211
  aBatchGroups.push("$auto");
196
212
  if (mParameters.bDraftNavigation !== true) {
197
213
  this._closeSideContent();
@@ -244,13 +260,28 @@ sap.ui.define(
244
260
  });
245
261
 
246
262
  //Set the Binding for Paginators using ListBinding ID
247
- if (oBinding && oBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
248
- var oPaginator = that.byId("fe::Paginator");
249
- if (oPaginator) {
250
- oPaginator.setListBinding(oBinding);
263
+ if (oBinding && iViewLevel > 1) {
264
+ if (oBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
265
+ this.paginator.initialize(oBinding, oContext);
266
+ } else {
267
+ //if the binding type is not ODataListBinding because of a deeplink navigation or a refresh of the page
268
+ // we need to create it
269
+ var sContextPath = oBinding.getPath().replace(/\([^\)]*\)*$/, ""); //removing the last tuple
270
+ var oBinding = new sap.ui.model.odata.v4.ODataListBinding(
271
+ oBinding.oModel,
272
+ "",
273
+ oBinding.oModel.createBindingContext(sContextPath)
274
+ );
275
+
276
+ oBinding.getContexts(0);
277
+ oBinding.attachEvent("change", function _setListBindingAsync() {
278
+ if (oBinding.getContexts().length > 0) {
279
+ that.paginator.initialize(oBinding, oContext);
280
+ oBinding.detachEvent("change", _setListBindingAsync);
281
+ }
282
+ });
251
283
  }
252
284
  }
253
-
254
285
  if (oObjectPage.getEnableLazyLoading()) {
255
286
  var aSections = oObjectPage.getSections(),
256
287
  bUseIconTabBar = oObjectPage.getUseIconTabBar(),
@@ -269,11 +300,91 @@ sap.ui.define(
269
300
  }
270
301
  }
271
302
  }
303
+
304
+ if (this.placeholder.isPlaceholderEnabled() && mParameters.showPlaceholder) {
305
+ var oView = this.getView();
306
+ var oNavContainer = oView.getParent().oContainer.getParent();
307
+ if (oNavContainer) {
308
+ oNavContainer.showPlaceholder({});
309
+ }
310
+ }
311
+ },
312
+
313
+ _getFirstClickableElement: function(oObjectPage) {
314
+ var oFirstClickableElement;
315
+ var aActions = oObjectPage.getHeaderTitle() && oObjectPage.getHeaderTitle().getActions();
316
+ if (aActions && aActions.length) {
317
+ oFirstClickableElement = aActions.find(function(oAction) {
318
+ return oAction.getVisible();
319
+ });
320
+ }
321
+ return oFirstClickableElement;
322
+ },
323
+
324
+ _getFirstEmptyMandatoryFieldFromSubSection: function(aSubSections) {
325
+ for (var subSection = 0; aSubSections && subSection < aSubSections.length; subSection++) {
326
+ var aBlocks = aSubSections[subSection].getBlocks();
327
+
328
+ for (var block = 0; aBlocks && block < aBlocks.length; block++) {
329
+ var aFormContainers;
330
+
331
+ if (aBlocks[block].isA("sap.ui.layout.form.Form")) {
332
+ aFormContainers = aBlocks[block].getFormContainers();
333
+ } else if (
334
+ aBlocks[block].getContent &&
335
+ aBlocks[block].getContent() &&
336
+ aBlocks[block].getContent().isA("sap.ui.layout.form.Form")
337
+ ) {
338
+ aFormContainers = aBlocks[block].getContent().getFormContainers();
339
+ }
340
+
341
+ for (var formContainer = 0; aFormContainers && formContainer < aFormContainers.length; formContainer++) {
342
+ var aFormElements = aFormContainers[formContainer].getFormElements();
343
+
344
+ for (var formElement = 0; aFormElements && formElement < aFormElements.length; formElement++) {
345
+ var aFields = aFormElements[formElement].getFields();
346
+
347
+ if (aFields[0].getRequired() && !aFields[0].getValue()) {
348
+ return aFields[0];
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
354
+ return undefined;
355
+ },
356
+
357
+ initialTab: {
358
+ value: true
272
359
  },
273
360
 
274
361
  _handleSubSectionEnteredViewPort: function(oEvent) {
275
362
  var oSubSection = oEvent.getParameter("subSection");
363
+ var oInternalModelContext = this.getView().getBindingContext("internal");
276
364
  oSubSection.setBindingContext(undefined);
365
+ var oObjectPage = this.byId("fe::ObjectPage");
366
+ if (oObjectPage.getModel("ui").getProperty("/editMode") !== "Display") {
367
+ if (
368
+ this.getView().getViewData().sectionLayout === "Tabs" &&
369
+ this.initialTab.value === false &&
370
+ oInternalModelContext.getProperty("errorNavigationSectionFlag") === false
371
+ ) {
372
+ var oFieldToFocus = this._getFirstEmptyMandatoryFieldFromSubSection([oSubSection]);
373
+ if (oFieldToFocus) {
374
+ oFieldToFocus.content.getContentEdit()[0].focus();
375
+ } else {
376
+ var oFirstEditableInput = oObjectPage._getFirstEditableInput();
377
+ if (oFirstEditableInput) {
378
+ oFirstEditableInput.focus();
379
+ } else {
380
+ var oFirstClickableElement = this._getFirstClickableElement(oObjectPage);
381
+ if (oFirstClickableElement) {
382
+ oFirstClickableElement.focus();
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
277
388
  },
278
389
 
279
390
  _onBackNavigationInDraft: function(oContext) {
@@ -299,14 +410,6 @@ sap.ui.define(
299
410
  // binding with ownRequest
300
411
  oBindingContext = oObjectPage.getBindingContext();
301
412
 
302
- //Show popup while navigating back from object page in case of draft
303
- if (oBindingContext) {
304
- var bIsStickyMode = ModelHelper.isStickySessionSupported(oBindingContext.getModel().getMetaModel());
305
- if (!bIsStickyMode) {
306
- var oAppComponent = CommonUtils.getAppComponent(this.getView());
307
- oAppComponent.getShellServices().setBackNavigation(that._onBackNavigationInDraft.bind(that, oBindingContext));
308
- }
309
- }
310
413
  var aIBNActions = [];
311
414
  oObjectPage.getSections().forEach(function(oSection) {
312
415
  oSection.getSubSections().forEach(function(oSubSection) {
@@ -331,7 +434,6 @@ sap.ui.define(
331
434
  }
332
435
  }
333
436
  // Workaround ends here!!
334
- TableUtils.getSemanticTargetsFromTable(that, oTable);
335
437
 
336
438
  // Update 'enabled' property of DataFieldForAction buttons on table toolbar
337
439
  // The same is also performed on Table selectionChange event
@@ -458,15 +560,35 @@ sap.ui.define(
458
560
  oObjectPage._triggerVisibleSubSectionsEvents();
459
561
  }
460
562
  },
461
-
462
563
  onPageReady: function(mParameters) {
463
564
  // Apply app state only after the page is ready with the first section selected
565
+ function getVisibleSections(oObjectPage) {
566
+ var aVisibleSections;
567
+ var aSections = oObjectPage.getSections();
568
+ if (aSections && aSections.length) {
569
+ aVisibleSections = aSections.filter(function(oSection) {
570
+ return oSection.getVisible() === true;
571
+ });
572
+ }
573
+ return aVisibleSections;
574
+ }
575
+ var that = this;
576
+ var oView = this.getView();
577
+ var oInternalModelContext = oView.getBindingContext("internal");
578
+ var oBindingContext = oView.getBindingContext();
579
+ //Show popup while navigating back from object page in case of draft
580
+ if (oBindingContext) {
581
+ var bIsStickyMode = ModelHelper.isStickySessionSupported(oBindingContext.getModel().getMetaModel());
582
+ if (!bIsStickyMode) {
583
+ var oAppComponent = CommonUtils.getAppComponent(oView);
584
+ oAppComponent.getShellServices().setBackNavigation(that._onBackNavigationInDraft.bind(that, oBindingContext));
585
+ }
586
+ }
464
587
  this.getAppComponent()
465
588
  .getAppStateHandler()
466
589
  .applyAppState();
467
590
  var oLastFocusedControl = mParameters.lastFocusedControl;
468
591
  if (oLastFocusedControl && oLastFocusedControl.controlId && oLastFocusedControl.focusInfo) {
469
- var oView = this.getView();
470
592
  var oFocusControl = oView.byId(oLastFocusedControl.controlId);
471
593
  if (oFocusControl) {
472
594
  oFocusControl.applyFocusInfo(oLastFocusedControl.focusInfo);
@@ -476,30 +598,56 @@ sap.ui.define(
476
598
  var oObjectPage = this.byId("fe::ObjectPage");
477
599
  // set the focus to the first action button, or to the first editable input if in editable mode
478
600
  var isInDisplayMode = oObjectPage.getModel("ui").getProperty("/editMode") === "Display";
479
- var firstElementClickable;
601
+ var oFirstClickableElement;
602
+ var aVisibleSections = getVisibleSections(oObjectPage);
603
+
480
604
  if (isInDisplayMode) {
481
- var aActions = oObjectPage.getHeaderTitle() && oObjectPage.getHeaderTitle().getActions();
482
- if (aActions && aActions.length) {
483
- firstElementClickable = aActions.find(function(action) {
484
- // do we need && action.mProperties["enabled"] ?
485
- return action.mProperties["visible"];
486
- });
487
- if (firstElementClickable) {
488
- firstElementClickable.focus();
489
- }
605
+ //Focus on the first visible section if page OP is in Display Mode
606
+ oObjectPage.setSelectedSection(aVisibleSections[0].getId());
607
+ oFirstClickableElement = this._getFirstClickableElement(oObjectPage);
608
+ if (oFirstClickableElement) {
609
+ oFirstClickableElement.focus();
490
610
  }
491
611
  } else {
492
- var firstEditableInput = oObjectPage._getFirstEditableInput();
493
- if (firstEditableInput) {
494
- firstEditableInput.focus();
612
+ //Focus on first mandatory empty field
613
+ oObjectPage.setSelectedSection(aVisibleSections[0].getId());
614
+ if (
615
+ oView.getViewData().sectionLayout === "Page" ||
616
+ (oView.getViewData().sectionLayout === "Tabs" && this.initialTab.value === true)
617
+ ) {
618
+ var oFieldToFocus;
619
+ var aSubSections = [];
620
+ for (var section = 0; section < aVisibleSections.length; section++) {
621
+ aSubSections = aVisibleSections[section].getSubSections();
622
+ oFieldToFocus = this._getFirstEmptyMandatoryFieldFromSubSection(aSubSections);
623
+ if (oFieldToFocus) {
624
+ oFieldToFocus.content.getContentEdit()[0].focus();
625
+ break;
626
+ }
627
+ }
628
+
629
+ //this.initialTab.value = false;
630
+ }
631
+ if (!oFieldToFocus) {
632
+ var oFirstEditableInput = oObjectPage._getFirstEditableInput();
633
+ if (oFirstEditableInput) {
634
+ oFirstEditableInput.focus();
635
+ } else {
636
+ oFirstClickableElement = this._getFirstClickableElement(oObjectPage);
637
+ if (oFirstClickableElement) {
638
+ oFirstClickableElement.focus();
639
+ }
640
+ }
495
641
  }
642
+ this.initialTab.value = false;
496
643
  }
644
+ oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
497
645
  this._checkDataPointTitleForExternalNavigation();
498
646
  },
499
647
  /**
500
- * Get sticky edit mode.
648
+ * Get the status of edit mode for sticky session.
501
649
  *
502
- * @returns {boolean} Sticky edit mode status
650
+ * @returns {boolean} The status of edit mode for sticky session
503
651
  *
504
652
  *
505
653
  */
@@ -514,6 +662,11 @@ sap.ui.define(
514
662
  }
515
663
  return bIsStickyEditMode;
516
664
  },
665
+
666
+ _getObjectPageLayoutControl: function() {
667
+ return this.byId("fe::ObjectPage");
668
+ },
669
+
517
670
  _getPageTitleInformation: function() {
518
671
  var oObjectPage = this.byId("fe::ObjectPage");
519
672
  var oObjectPageSubtitle = oObjectPage.getCustomData().find(function(oCustomData) {
@@ -661,7 +814,9 @@ sap.ui.define(
661
814
  .saveDocument(oContext, mParameters)
662
815
  .catch(that._showMessagePopover.bind(that))
663
816
  .finally(function() {
664
- BusyLocker.unlock(oModel);
817
+ if (BusyLocker.isLocked(oModel)) {
818
+ BusyLocker.unlock(oModel);
819
+ }
665
820
  });
666
821
  });
667
822
  },
@@ -787,90 +942,7 @@ sap.ui.define(
787
942
  },
788
943
 
789
944
  /**
790
- * Get the Row that has the corresponding binding context
791
- *
792
- * @function
793
- * @name sap.fe.templates.ObjectPage.ObjectPageController.controller#_getTableRow
794
- * @param {object} oTableRowBindingContexts 'contexts of the table rows'
795
- * @param {string} sRowPath 'sPath of the table row'
796
- * @returns {object} row satisfying the criterias passed in parameter
797
- */
798
-
799
- _getTableRow: function(oTableRowBindingContexts, sRowPath) {
800
- if (
801
- oTableRowBindingContexts.filter(function(item) {
802
- return item !== undefined;
803
- }).length > 0
804
- ) {
805
- var oTableRow = oTableRowBindingContexts.find(function(item) {
806
- return item.getPath().indexOf(sRowPath) !== -1;
807
- });
808
- return oTableRow;
809
- } else {
810
- return undefined;
811
- }
812
- },
813
-
814
- /**
815
- * Scroll the table to the Row that has the corresponding sPath
816
- *
817
- * @function
818
- * @name sap.fe.templates.ObjectPage.ObjectPageController.controller#_scrollTableToRow
819
- * @param {object} oTable 'table to be scrolled'
820
- * @param {string} sRowPath 'sPath of the table row'
821
- *
822
- */
823
-
824
- _scrollTableToRow: function(oTable, sRowPath) {
825
- var oTableRowBinding = oTable.getRowBinding();
826
- var that = this;
827
- var pWait = new Promise(function(resolve, reject) {
828
- if (oTableRowBinding) {
829
- var oTableRowBindingContexts;
830
- switch (oTable.data().tableType) {
831
- case "GridTable":
832
- oTableRowBindingContexts = oTableRowBinding.getContexts(0);
833
- break;
834
- case "ResponsiveTable":
835
- oTableRowBindingContexts = oTableRowBinding.getCurrentContexts();
836
- break;
837
- default:
838
- }
839
- //wait for the bindingContexts to be ready when a view enters/goes out of FCL fullscreen :
840
- if (
841
- oTableRowBindingContexts.filter(function(item) {
842
- return item === undefined;
843
- }).length > 0 ||
844
- oTableRowBindingContexts.length === 0
845
- ) {
846
- oTableRowBinding.attachChange(function getTableRowCallBack(oEvent) {
847
- var oTableRowBindingContexts = that._getTableRow(oEvent.getSource().getCurrentContexts(), sRowPath);
848
- if (oTableRowBindingContexts) {
849
- oTableRowBinding.detachChange(getTableRowCallBack);
850
- resolve(oTableRowBindingContexts);
851
- }
852
- });
853
- } else {
854
- resolve(that._getTableRow(oTableRowBindingContexts, sRowPath));
855
- }
856
- } else {
857
- reject();
858
- }
859
- });
860
- pWait
861
- .then(function(oTableRow) {
862
- if (oTableRow) {
863
- var iPos = oTableRow.iIndex;
864
- oTable.scrollToIndex(iPos);
865
- }
866
- })
867
- .catch(function() {
868
- Log.warning("Could not find any matched row");
869
- });
870
- },
871
-
872
- /**
873
- * Scroll the Tables to the Row with the sPath
945
+ * Scroll the tables to the row with the sPath
874
946
  *
875
947
  * @function
876
948
  * @name sap.fe.templates.ObjectPage.ObjectPageController.controller#_scrollTablesToRow
@@ -882,7 +954,7 @@ sap.ui.define(
882
954
  if (this._findTables && this._findTables().length > 0) {
883
955
  var aTables = this._findTables();
884
956
  for (var i = 0; i < aTables.length; i++) {
885
- this._scrollTableToRow(aTables[i], sRowPath);
957
+ TableScroller.scrollTableToRow(aTables[i], sRowPath);
886
958
  }
887
959
  }
888
960
  },
@@ -1001,7 +1073,7 @@ sap.ui.define(
1001
1073
  var oTitleHierarchyCache = oRootViewController.getTitleHierarchyCache();
1002
1074
  var pWaitForTitleHiearchyInfo;
1003
1075
  var sParameterPath = oMetaModel.getMetaPath(sPath);
1004
- var bResultContext = oMetaModel.getProperty(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
1076
+ var bResultContext = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
1005
1077
  if (bResultContext) {
1006
1078
  // We dont need to create a breadcrumb for Parameter path
1007
1079
  iSkipParameterized = 1;
@@ -1195,11 +1267,6 @@ sap.ui.define(
1195
1267
  Log.error("An error occurs while scrolling to the newly created Item: " + err);
1196
1268
  });
1197
1269
  }
1198
- // fire DataStateChange whenever there is a table context change to update row highlighting
1199
- var oDataStateIndicator = oTable.getDataStateIndicator();
1200
- if (oDataStateIndicator.getFilter()(null, oTable)) {
1201
- oDataStateIndicator.fireDataStateChange();
1202
- }
1203
1270
  // fire ModelContextChange on the message button whenever the table context changes
1204
1271
  var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton");
1205
1272
  oMessageButton.fireModelContextChange();
@@ -1234,7 +1301,8 @@ sap.ui.define(
1234
1301
  .getModel()
1235
1302
  .getMetaModel()
1236
1303
  .getMetaPath(oDataPointOrChartBindingContext.getPath()),
1237
- aNavigationData = oController._getChartContextData(oDataPointOrChartBindingContext, sCollectionPath);
1304
+ aNavigationData = oController._getChartContextData(oDataPointOrChartBindingContext, sCollectionPath),
1305
+ additionalNavigationParameters;
1238
1306
 
1239
1307
  aNavigationData = aNavigationData.map(function(oNavigationData) {
1240
1308
  return {
@@ -1242,46 +1310,41 @@ sap.ui.define(
1242
1310
  metaPath: sMetaPath + (sCollectionPath ? "/" + sCollectionPath : "")
1243
1311
  };
1244
1312
  });
1313
+ if (oTargetInfo && oTargetInfo.parameters) {
1314
+ var oParams =
1315
+ oTargetInfo.parameters && oController._intentBasedNavigation.getOutboundParams(oTargetInfo.parameters);
1316
+ if (Object.keys(oParams).length > 0) {
1317
+ additionalNavigationParameters = oParams;
1318
+ }
1319
+ }
1245
1320
  if (oTargetInfo && oTargetInfo.semanticObject && oTargetInfo.action) {
1246
1321
  oController._intentBasedNavigation.navigate(oTargetInfo.semanticObject, oTargetInfo.action, {
1247
1322
  navigationContexts: aNavigationData,
1248
- semanticObjectMapping: aSemanticObjectMapping
1323
+ semanticObjectMapping: aSemanticObjectMapping,
1324
+ additionalNavigationParameters: additionalNavigationParameters
1249
1325
  });
1250
1326
  }
1251
1327
  },
1252
1328
  /**
1253
1329
  * Triggers an outbound navigation when a user chooses the chevron.
1254
1330
  *
1255
- * @param oController
1331
+ * @param {object} oController
1256
1332
  * @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)
1258
- * @param {sap.ui.model.odata.v4.Context} oContext That contain the data for the target app
1259
- =======
1260
1333
  * @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
1261
1334
  * @param {string} sCreatePath Create path when the chevron is created.
1262
- >>>>>>> CHANGE (657783 [FIX] The message popover controls are now closed when leavi)
1263
1335
  * @returns {Promise} Promise which is resolved once the navigation is triggered (??? maybe only once finished?)
1336
+ * @ui5-restricted
1337
+ * @final
1264
1338
  */
1265
- onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext) {
1266
- var oOutbounds = oController
1267
- .getAppComponent()
1268
- .getRoutingService()
1269
- .getOutbounds(),
1270
- oDisplayOutbound = oOutbounds[sOutboundTarget];
1271
- if (oDisplayOutbound && oDisplayOutbound.semanticObject && oDisplayOutbound.action) {
1272
- oContext = oContext && oContext.isA && oContext.isA("sap.ui.model.odata.v4.Context") ? [oContext] : oContext;
1273
- oController._intentBasedNavigation.navigate(oDisplayOutbound.semanticObject, oDisplayOutbound.action, {
1274
- navigationContexts: oContext
1275
- });
1276
-
1277
- //TODO: check why returning a promise is required
1278
- // If there is no reason for the promise then this function can be removed
1279
- // and instead intentBasedNavigation.navigate can be directly used.
1280
- return Promise.resolve();
1281
- } else {
1282
- throw new Error("outbound target " + sOutboundTarget + " not found in cross navigation definition of manifest");
1283
- }
1339
+ onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext, sCreatePath) {
1340
+ return oController._intentBasedNavigation.onChevronPressNavigateOutBound(
1341
+ oController,
1342
+ sOutboundTarget,
1343
+ oContext,
1344
+ sCreatePath
1345
+ );
1284
1346
  },
1347
+
1285
1348
  onNavigateChange: function(oEvent) {
1286
1349
  //will be called always when we click on a section tab
1287
1350
  this.getExtensionAPI().updateAppState();
@@ -9,7 +9,7 @@ sap.ui.define(["sap/uxap/BlockBase"], function(BlockBase) {
9
9
  var SubSectionBlock = BlockBase.extend("sap.fe.templates.ObjectPage.controls.SubSectionBlock", {
10
10
  metadata: {
11
11
  properties: {
12
- "columnLayout": { type: "sap.uxap.BlockBaseColumnLayout", group: "Behavior", defaultValue: 4 }
12
+ columnLayout: { type: "sap.uxap.BlockBaseColumnLayout", group: "Behavior", defaultValue: 4 }
13
13
  },
14
14
  aggregations: {
15
15
  content: {
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAPUI5
3
+ * (c) Copyright 2009-2021 SAP SE. All rights reserved.
4
+ */
5
+ sap.ui.define([], function() {
6
+ "use strict";
7
+ return {
8
+ onContextUpdate: function(oContext) {
9
+ var that = this;
10
+ that.base._routing.navigateToContext(oContext, { callExtension: true });
11
+ }
12
+ };
13
+ });
@@ -294,13 +294,13 @@ sap.ui.define(
294
294
  var oPageTitleInfo = oData[0];
295
295
  var sJamUrl = oData[1];
296
296
  var sTitle = oPageTitleInfo.title;
297
- var sObjectSubtitle = oPageTitleInfo.subtitle;
297
+ var sObjectSubtitle = oPageTitleInfo.subtitle.toString();
298
298
  if (sObjectSubtitle) {
299
299
  sTitle = sTitle + " - " + sObjectSubtitle;
300
300
  }
301
301
  oShareMetadata.tile = {
302
302
  title: oPageTitleInfo.title,
303
- subtitle: oPageTitleInfo.subtitle
303
+ subtitle: oPageTitleInfo.subtitle.toString()
304
304
  };
305
305
  oShareMetadata.email.title = sTitle;
306
306
  oShareMetadata.title = sTitle;
@@ -2,7 +2,7 @@
2
2
  * SAPUI5
3
3
  * (c) Copyright 2009-2021 SAP SE. All rights reserved.
4
4
  */
5
- sap.ui.define(["sap/fe/core/library"], function(CoreLibrary) {
5
+ sap.ui.define(["sap/fe/core/library", "sap/fe/core/CommonUtils"], function(CoreLibrary, CommonUtils) {
6
6
  "use strict";
7
7
 
8
8
  var VariantManagement = CoreLibrary.VariantManagement;
@@ -39,6 +39,27 @@ sap.ui.define(["sap/fe/core/library"], function(CoreLibrary) {
39
39
  });
40
40
 
41
41
  aStateControls.push(oView.byId("fe::ObjectPage"));
42
+ },
43
+ adaptBindingRefreshControls: function(aControls) {
44
+ var oView = this.getView(),
45
+ sRefreshStrategy = CommonUtils.getViewRefreshInfo(oView),
46
+ oController = oView.getController(),
47
+ aControlsToRefresh = [];
48
+
49
+ if (sRefreshStrategy) {
50
+ var oObjectPageControl = oController._getObjectPageLayoutControl();
51
+ aControlsToRefresh.push(oObjectPageControl);
52
+ }
53
+ if (sRefreshStrategy !== "includingDependents") {
54
+ var aViewControls = oController._findTables();
55
+ aControlsToRefresh = aControlsToRefresh.concat(CommonUtils.getControlsForRefresh(oView, aViewControls) || []);
56
+ }
57
+ return aControlsToRefresh.reduce(function(aPrevControls, oControl) {
58
+ if (aPrevControls.indexOf(oControl) === -1) {
59
+ aPrevControls.push(oControl);
60
+ }
61
+ return aPrevControls;
62
+ }, aControls);
42
63
  }
43
64
  };
44
65
  });