@sapui5/sap.fe.templates 1.93.3 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +31 -3
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +9 -7
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +244 -229
- package/src/sap/fe/templates/ListReport/manifest.json +11 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +2 -6
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +151 -28
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +35 -99
- package/src/sap/fe/templates/ObjectPage/Component.js +15 -4
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -3
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +169 -165
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +262 -170
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +8 -0
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +42 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +16 -14
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +20 -8
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +14 -19
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +26 -16
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +5 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +8 -4
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -115
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +113 -99
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +32 -21
- package/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
- package/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
- package/src/sap/fe/templates/TableScroller.js +61 -0
- package/src/sap/fe/templates/controls/Chart.fragment.xml +11 -14
- package/src/sap/fe/templates/controls/Table.fragment.xml +3 -0
- package/src/sap/fe/templates/library.js +1 -1
- package/src/sap/fe/templates/messagebundle.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +9 -5
- package/src/sap/fe/templates/messagebundle_bg.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ca.properties +8 -4
- package/src/sap/fe/templates/messagebundle_cs.properties +7 -3
- package/src/sap/fe/templates/messagebundle_cy.properties +8 -4
- package/src/sap/fe/templates/messagebundle_da.properties +9 -5
- package/src/sap/fe/templates/messagebundle_de.properties +8 -4
- package/src/sap/fe/templates/messagebundle_el.properties +8 -4
- package/src/sap/fe/templates/messagebundle_en.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_GB.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
- package/src/sap/fe/templates/messagebundle_es.properties +8 -4
- package/src/sap/fe/templates/messagebundle_es_MX.properties +8 -4
- package/src/sap/fe/templates/messagebundle_et.properties +7 -3
- package/src/sap/fe/templates/messagebundle_fi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_fr.properties +9 -5
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hr.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hu.properties +9 -5
- package/src/sap/fe/templates/messagebundle_id.properties +10 -6
- package/src/sap/fe/templates/messagebundle_it.properties +8 -4
- package/src/sap/fe/templates/messagebundle_iw.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ja.properties +8 -4
- package/src/sap/fe/templates/messagebundle_kk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ko.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ms.properties +8 -4
- package/src/sap/fe/templates/messagebundle_nl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_no.properties +9 -5
- package/src/sap/fe/templates/messagebundle_pl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ro.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ru.properties +9 -5
- package/src/sap/fe/templates/messagebundle_sh.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_th.properties +9 -5
- package/src/sap/fe/templates/messagebundle_tr.properties +7 -3
- package/src/sap/fe/templates/messagebundle_uk.properties +7 -3
- package/src/sap/fe/templates/messagebundle_vi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -5
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +8 -4
- package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
- package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
- package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
- package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
- package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -25
- package/src/sap/fe/templates/controls/Paginator.control.xml +0 -22
- package/src/sap/fe/templates/controls/Paginator.js +0 -173
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
<layout:DynamicSideContent
|
|
30
30
|
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
31
31
|
showMainContent="true"
|
|
32
|
-
showSideContent="{
|
|
32
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
33
33
|
sideContentFallDown="BelowM"
|
|
34
34
|
containerQuery="true"
|
|
35
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
35
36
|
>
|
|
36
37
|
<layout:mainContent>
|
|
37
38
|
<core:Fragment
|
|
@@ -69,9 +70,10 @@
|
|
|
69
70
|
<layout:DynamicSideContent
|
|
70
71
|
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
71
72
|
showMainContent="true"
|
|
72
|
-
showSideContent="{
|
|
73
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
73
74
|
sideContentFallDown="BelowM"
|
|
74
75
|
containerQuery="true"
|
|
76
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
75
77
|
>
|
|
76
78
|
<layout:mainContent>
|
|
77
79
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionFormContent" type="XML" />
|
|
@@ -103,9 +105,10 @@
|
|
|
103
105
|
<layout:DynamicSideContent
|
|
104
106
|
id="{= ID.generate(['fe', ${subSection>key}, 'MoreSideContentLayout'])}"
|
|
105
107
|
showMainContent="true"
|
|
106
|
-
showSideContent="{
|
|
108
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
107
109
|
sideContentFallDown="BelowM"
|
|
108
110
|
containerQuery="true"
|
|
111
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
109
112
|
>
|
|
110
113
|
<layout:mainContent>
|
|
111
114
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionMoreFormContent" type="XML" />
|
|
@@ -140,9 +143,10 @@
|
|
|
140
143
|
<layout:DynamicSideContent
|
|
141
144
|
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
142
145
|
showMainContent="true"
|
|
143
|
-
showSideContent="{
|
|
146
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
144
147
|
sideContentFallDown="BelowM"
|
|
145
148
|
containerQuery="true"
|
|
149
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
146
150
|
>
|
|
147
151
|
<layout:mainContent>
|
|
148
152
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionPresentationVisualization" type="XML" />
|
|
@@ -9,12 +9,24 @@ sap.ui.define(
|
|
|
9
9
|
"./RootContainerBaseController",
|
|
10
10
|
"sap/f/FlexibleColumnLayoutSemanticHelper",
|
|
11
11
|
"sap/ui/core/Component",
|
|
12
|
+
"sap/fe/core/helpers/KeepAliveHelper",
|
|
12
13
|
"sap/fe/core/controllerextensions/ViewState",
|
|
13
14
|
"sap/m/Link",
|
|
14
15
|
"sap/m/MessagePage",
|
|
15
16
|
"sap/m/MessageBox"
|
|
16
17
|
],
|
|
17
|
-
function(
|
|
18
|
+
function(
|
|
19
|
+
Log,
|
|
20
|
+
JSONModel,
|
|
21
|
+
BaseController,
|
|
22
|
+
FlexibleColumnLayoutSemanticHelper,
|
|
23
|
+
Component,
|
|
24
|
+
KeepAliveHelper,
|
|
25
|
+
ViewState,
|
|
26
|
+
Link,
|
|
27
|
+
MessagePage,
|
|
28
|
+
MessageBox
|
|
29
|
+
) {
|
|
18
30
|
"use strict";
|
|
19
31
|
|
|
20
32
|
var CONSTANTS = {
|
|
@@ -54,28 +66,54 @@ sap.ui.define(
|
|
|
54
66
|
applyInitialStateOnly: function() {
|
|
55
67
|
return false;
|
|
56
68
|
},
|
|
69
|
+
adaptBindingRefreshControls: function(aControls) {
|
|
70
|
+
this.getView()
|
|
71
|
+
.getController()
|
|
72
|
+
._getAllVisibleViews()
|
|
73
|
+
.forEach(function(oChildView) {
|
|
74
|
+
var pChildView = new Promise(function(resolve) {
|
|
75
|
+
resolve(oChildView);
|
|
76
|
+
});
|
|
77
|
+
aControls.push(pChildView);
|
|
78
|
+
});
|
|
79
|
+
},
|
|
57
80
|
adaptStateControls: function(aStateControls) {
|
|
58
81
|
this.getView()
|
|
59
82
|
.getController()
|
|
60
83
|
._getAllVisibleViews()
|
|
61
84
|
.forEach(function(oChildView) {
|
|
62
85
|
var pChildView = new Promise(function(resolve) {
|
|
63
|
-
|
|
64
|
-
oChildView &&
|
|
65
|
-
oChildView.getController &&
|
|
66
|
-
oChildView.getController().isPlaceholder &&
|
|
67
|
-
oChildView.getController().isPlaceholder()
|
|
68
|
-
) {
|
|
69
|
-
oChildView.getController().attachEventOnce("targetPageInsertedInContainer", function(oEvent) {
|
|
70
|
-
var oTargetPage = oEvent.getParameter("targetpage");
|
|
71
|
-
resolve(_getViewFromContainer(oTargetPage));
|
|
72
|
-
});
|
|
73
|
-
} else {
|
|
74
|
-
resolve(oChildView);
|
|
75
|
-
}
|
|
86
|
+
resolve(oChildView);
|
|
76
87
|
});
|
|
77
88
|
aStateControls.push(pChildView);
|
|
78
89
|
});
|
|
90
|
+
},
|
|
91
|
+
onRestore: function() {
|
|
92
|
+
var oView = this.getView(),
|
|
93
|
+
oNavContainer = oView.byId("appContent");
|
|
94
|
+
var oInternalModel = oNavContainer.getModel("internal");
|
|
95
|
+
var oPages = oInternalModel.getProperty("/pages");
|
|
96
|
+
|
|
97
|
+
for (var sComponentId in oPages) {
|
|
98
|
+
oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
onSuspend: function() {
|
|
102
|
+
var oFCLController = this.getView().getController();
|
|
103
|
+
var oFCLControl = oFCLController.getFclControl();
|
|
104
|
+
var aBeginColumnPages = oFCLControl.getBeginColumnPages() || [];
|
|
105
|
+
var aMidColumnPages = oFCLControl.getMidColumnPages() || [];
|
|
106
|
+
var aEndColumnPages = oFCLControl.getEndColumnPages() || [];
|
|
107
|
+
var aPages = [].concat(aBeginColumnPages, aMidColumnPages, aEndColumnPages);
|
|
108
|
+
|
|
109
|
+
aPages.forEach(function(oPage) {
|
|
110
|
+
var oTargetView = _getViewFromContainer(oPage);
|
|
111
|
+
|
|
112
|
+
var oController = oTargetView && oTargetView.getController();
|
|
113
|
+
if (oController && oController.viewState && oController.viewState.onSuspend) {
|
|
114
|
+
return oController.viewState.onSuspend();
|
|
115
|
+
}
|
|
116
|
+
});
|
|
79
117
|
}
|
|
80
118
|
}),
|
|
81
119
|
|
|
@@ -498,9 +536,11 @@ sap.ui.define(
|
|
|
498
536
|
if (FCLLevel >= this._oFCLConfig.maxColumnsCount) {
|
|
499
537
|
// The view is on a level > max number of columns. It's always fullscreen without close/exit buttons
|
|
500
538
|
viewColumn = oFclColName[this._oFCLConfig.maxColumnsCount - 1];
|
|
539
|
+
oUIState.actionButtonsInfo.midColumn.fullScreen = null;
|
|
501
540
|
oUIState.actionButtonsInfo.midColumn.exitFullScreen = null;
|
|
502
541
|
oUIState.actionButtonsInfo.midColumn.closeColumn = null;
|
|
503
542
|
oUIState.actionButtonsInfo.endColumn.exitFullScreen = null;
|
|
543
|
+
oUIState.actionButtonsInfo.endColumn.fullScreen = null;
|
|
504
544
|
oUIState.actionButtonsInfo.endColumn.closeColumn = null;
|
|
505
545
|
} else {
|
|
506
546
|
viewColumn = oFclColName[FCLLevel];
|
|
@@ -520,7 +560,13 @@ sap.ui.define(
|
|
|
520
560
|
// so we have to add this info manually
|
|
521
561
|
oUIState.actionButtonsInfo.beginColumn = { fullScreen: null, exitFullScreen: null, closeColumn: null };
|
|
522
562
|
|
|
523
|
-
|
|
563
|
+
var oActionButtonInfos = Object.assign({}, oUIState.actionButtonsInfo[viewColumn]);
|
|
564
|
+
oActionButtonInfos.switchVisible = oActionButtonInfos.fullScreen !== null || oActionButtonInfos.exitFullScreen !== null;
|
|
565
|
+
oActionButtonInfos.switchIcon =
|
|
566
|
+
oActionButtonInfos.fullScreen !== null ? "sap-icon://full-screen" : "sap-icon://exit-full-screen";
|
|
567
|
+
oActionButtonInfos.isFullScreen = oActionButtonInfos.fullScreen === null;
|
|
568
|
+
|
|
569
|
+
oView.getModel("fclhelper").setProperty("/actionButtonsInfo", oActionButtonInfos);
|
|
524
570
|
|
|
525
571
|
oView.getModel("fclhelper").setProperty("/showShareIcon", this._updateShareButtonVisibility(viewColumn, sLayout));
|
|
526
572
|
},
|
|
@@ -551,11 +597,7 @@ sap.ui.define(
|
|
|
551
597
|
|
|
552
598
|
// Update the layout of the FlexibleColumnLayout
|
|
553
599
|
if (sLayout) {
|
|
554
|
-
|
|
555
|
-
this.getFclControl().setModel(new JSONModel(), "fcl");
|
|
556
|
-
this.getFclControl().bindProperty("layout", "fcl>/layout");
|
|
557
|
-
}
|
|
558
|
-
this.getFclControl().setProperty("layout", sLayout);
|
|
600
|
+
this.getFclControl().setLayout(sLayout);
|
|
559
601
|
}
|
|
560
602
|
}
|
|
561
603
|
},
|
|
@@ -710,104 +752,64 @@ sap.ui.define(
|
|
|
710
752
|
return aViews;
|
|
711
753
|
},
|
|
712
754
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
break;
|
|
758
|
-
case 1:
|
|
759
|
-
if (!oPlaceholderTarget["mid"]) {
|
|
760
|
-
oPlaceholderTarget["mid"] = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
761
|
-
oRootContainer.addMidColumnPage(oPlaceholderTarget["mid"]);
|
|
762
|
-
oRootContainer.setDefaultTransitionNameMidColumn("placeholder");
|
|
763
|
-
bFirstNavigation = true;
|
|
755
|
+
onContainerReady: function() {
|
|
756
|
+
// Restore views if neccessary.
|
|
757
|
+
var aViews = this._getAllVisibleViews();
|
|
758
|
+
var aRestorePromises = [];
|
|
759
|
+
aViews.reduce(function(aPromises, oTargetView) {
|
|
760
|
+
aPromises.push(KeepAliveHelper.restoreView(oTargetView));
|
|
761
|
+
return aPromises;
|
|
762
|
+
}, aRestorePromises);
|
|
763
|
+
return Promise.all(aRestorePromises);
|
|
764
|
+
},
|
|
765
|
+
|
|
766
|
+
getRightmostContext: function() {
|
|
767
|
+
var oContext;
|
|
768
|
+
switch (this.getFclControl().getLayout()) {
|
|
769
|
+
case sap.f.LayoutType.OneColumn:
|
|
770
|
+
if (this.getFclControl().getCurrentBeginColumnPage()) {
|
|
771
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentBeginColumnPage()).getBindingContext();
|
|
772
|
+
}
|
|
773
|
+
break;
|
|
774
|
+
|
|
775
|
+
case sap.f.LayoutType.TwoColumnsBeginExpanded:
|
|
776
|
+
case sap.f.LayoutType.TwoColumnsMidExpanded:
|
|
777
|
+
if (this.getFclControl().getCurrentMidColumnPage()) {
|
|
778
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentMidColumnPage()).getBindingContext();
|
|
779
|
+
}
|
|
780
|
+
break;
|
|
781
|
+
|
|
782
|
+
case sap.f.LayoutType.ThreeColumnsEndExpanded:
|
|
783
|
+
case sap.f.LayoutType.ThreeColumnsMidExpanded:
|
|
784
|
+
case sap.f.LayoutType.ThreeColumnsMidExpandedEndHidden:
|
|
785
|
+
case sap.f.LayoutType.ThreeColumnsBeginExpandedEndHidden:
|
|
786
|
+
case sap.f.LayoutType.EndColumnFullScreen:
|
|
787
|
+
if (this.getFclControl().getCurrentEndColumnPage()) {
|
|
788
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentEndColumnPage()).getBindingContext();
|
|
789
|
+
}
|
|
790
|
+
break;
|
|
791
|
+
|
|
792
|
+
case sap.f.LayoutType.MidColumnFullScreen:
|
|
793
|
+
// In this case we need to determine if this mid column fullscreen comes from a 2 or a 3 column layout
|
|
794
|
+
var sLayoutWhenExitFullScreen = this.getHelper().getCurrentUIState().actionButtonsInfo.midColumn.exitFullScreen;
|
|
795
|
+
if (sLayoutWhenExitFullScreen.indexOf("ThreeColumn") >= 0) {
|
|
796
|
+
// We come from a 3 column layout
|
|
797
|
+
if (this.getFclControl().getCurrentEndColumnPage()) {
|
|
798
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentEndColumnPage()).getBindingContext();
|
|
764
799
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
if (!oPlaceholderTarget["end"]) {
|
|
770
|
-
oPlaceholderTarget["end"] = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
771
|
-
oRootContainer.addEndColumnPage(oPlaceholderTarget["end"]);
|
|
772
|
-
oRootContainer.setDefaultTransitionNameEndColumn("placeholder");
|
|
773
|
-
bFirstNavigation = true;
|
|
800
|
+
} else {
|
|
801
|
+
// We come from a 2 column layout
|
|
802
|
+
if (this.getFclControl().getCurrentMidColumnPage()) {
|
|
803
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentMidColumnPage()).getBindingContext();
|
|
774
804
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
var sStartupParameter;
|
|
783
|
-
var bPlaceholderScreenEnabledFirstTimeOnly;
|
|
784
|
-
if (this.oPlaceholder.isPlaceholderEnabled) {
|
|
785
|
-
if (oTarget.name === "sap.fe.templates.ListReport") {
|
|
786
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_DATA_LOADED;
|
|
787
|
-
bPlaceholderScreenEnabledFirstTimeOnly = true;
|
|
788
|
-
} else {
|
|
789
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_HEROES_LOADED;
|
|
790
|
-
bPlaceholderScreenEnabledFirstTimeOnly = false;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
if ((bPlaceholderScreenEnabledFirstTimeOnly && !toView.getController().istargetNavigated(oTarget)) || bFirstNavigation) {
|
|
794
|
-
toView.getController().setPlaceholderOption(sStartupParameter);
|
|
795
|
-
fnTo.apply(oRootContainer, [toView, "show"]);
|
|
796
|
-
bPlaceholderDisplayed = true;
|
|
797
|
-
} else if (!bPlaceholderScreenEnabledFirstTimeOnly && targetIndex === aTargets.length - 1) {
|
|
798
|
-
//placeholder should not be displayed if only the appstate is modified
|
|
799
|
-
var sCurrentHashNoAppState = oRouter
|
|
800
|
-
.getHashChanger()
|
|
801
|
-
.getHash()
|
|
802
|
-
.replace(/[&?]{1}sap-iapp-state=[A-Z0-9]+/, "");
|
|
803
|
-
if (this.sPreviousHashNoAppState !== sCurrentHashNoAppState) {
|
|
804
|
-
toView.getController().setPlaceholderOption(sStartupParameter);
|
|
805
|
-
fnTo.apply(oRootContainer, [toView, "show"]);
|
|
806
|
-
bPlaceholderDisplayed = true;
|
|
807
|
-
}
|
|
808
|
-
this.sPreviousHashNoAppState = sCurrentHashNoAppState;
|
|
805
|
+
}
|
|
806
|
+
break;
|
|
807
|
+
|
|
808
|
+
default:
|
|
809
|
+
Log.error("Unhandled switch case for " + this.getFclControl().getLayout());
|
|
809
810
|
}
|
|
810
|
-
|
|
811
|
+
|
|
812
|
+
return oContext;
|
|
811
813
|
}
|
|
812
814
|
});
|
|
813
815
|
},
|
|
@@ -7,12 +7,14 @@ sap.ui.define(
|
|
|
7
7
|
"sap/ui/model/json/JSONModel",
|
|
8
8
|
"./RootContainerBaseController",
|
|
9
9
|
"sap/fe/core/CommonUtils",
|
|
10
|
+
"sap/fe/core/helpers/KeepAliveHelper",
|
|
10
11
|
"sap/fe/core/controllerextensions/ViewState",
|
|
11
12
|
"sap/m/Link",
|
|
12
13
|
"sap/m/MessagePage",
|
|
13
|
-
"sap/m/MessageBox"
|
|
14
|
+
"sap/m/MessageBox",
|
|
15
|
+
"sap/base/Log"
|
|
14
16
|
],
|
|
15
|
-
function(JSONModel, BaseController, CommonUtils, ViewState, Link, MessagePage, MessageBox) {
|
|
17
|
+
function(JSONModel, BaseController, CommonUtils, KeepAliveHelper, ViewState, Link, MessagePage, MessageBox, Log) {
|
|
16
18
|
"use strict";
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -30,32 +32,74 @@ sap.ui.define(
|
|
|
30
32
|
applyInitialStateOnly: function() {
|
|
31
33
|
return false;
|
|
32
34
|
},
|
|
35
|
+
adaptBindingRefreshControls: function(aControls) {
|
|
36
|
+
var oView = this.getView(),
|
|
37
|
+
oController = oView.getController();
|
|
38
|
+
aControls.push(oController._getCurrentPage(oView));
|
|
39
|
+
},
|
|
33
40
|
adaptStateControls: function(aStateControls) {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
var oView = this.getView(),
|
|
42
|
+
oController = oView.getController();
|
|
43
|
+
aStateControls.push(oController._getCurrentPage(oView));
|
|
44
|
+
},
|
|
45
|
+
onRestore: function() {
|
|
46
|
+
var oView = this.getView(),
|
|
47
|
+
oNavContainer = oView.byId("appContent");
|
|
48
|
+
var oInternalModel = oNavContainer.getModel("internal");
|
|
49
|
+
var oPages = oInternalModel.getProperty("/pages");
|
|
50
|
+
|
|
51
|
+
for (var sComponentId in oPages) {
|
|
52
|
+
oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
onSuspend: function() {
|
|
56
|
+
var oView = this.getView(),
|
|
57
|
+
oNavContainer = oView.byId("appContent");
|
|
58
|
+
var aPages = oNavContainer.getPages();
|
|
59
|
+
aPages.forEach(function(oPage) {
|
|
60
|
+
var oTargetView = CommonUtils.getTargetView(oPage);
|
|
61
|
+
|
|
62
|
+
var oController = oTargetView && oTargetView.getController();
|
|
63
|
+
if (oController && oController.viewState && oController.viewState.onSuspend) {
|
|
64
|
+
return oController.viewState.onSuspend();
|
|
53
65
|
}
|
|
54
66
|
});
|
|
55
|
-
aStateControls.push(pCurrentPage);
|
|
56
67
|
}
|
|
57
68
|
}),
|
|
58
69
|
|
|
70
|
+
onContainerReady: function() {
|
|
71
|
+
// Restore views if neccessary.
|
|
72
|
+
var oView = this.getView(),
|
|
73
|
+
oPagePromise = this._getCurrentPage(oView);
|
|
74
|
+
|
|
75
|
+
return oPagePromise.then(function(oCurrentPage) {
|
|
76
|
+
var oTargetView = CommonUtils.getTargetView(oCurrentPage);
|
|
77
|
+
return KeepAliveHelper.restoreView(oTargetView);
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
_getCurrentPage: function(oView) {
|
|
82
|
+
return new Promise(function(resolve) {
|
|
83
|
+
var oNavContainer = oView.byId("appContent");
|
|
84
|
+
var oCurrentPage = oNavContainer.getCurrentPage();
|
|
85
|
+
if (
|
|
86
|
+
oCurrentPage &&
|
|
87
|
+
oCurrentPage.getController &&
|
|
88
|
+
oCurrentPage.getController().isPlaceholder &&
|
|
89
|
+
oCurrentPage.getController().isPlaceholder()
|
|
90
|
+
) {
|
|
91
|
+
oCurrentPage.getController().attachEventOnce("targetPageInsertedInContainer", function(oEvent) {
|
|
92
|
+
var oTargetPage = oEvent.getParameter("targetpage");
|
|
93
|
+
var oTargetView = CommonUtils.getTargetView(oTargetPage);
|
|
94
|
+
resolve(oTargetView !== oView && oTargetView);
|
|
95
|
+
});
|
|
96
|
+
} else {
|
|
97
|
+
var oTargetView = CommonUtils.getTargetView(oCurrentPage);
|
|
98
|
+
resolve(oTargetView !== oView && oTargetView);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
|
|
59
103
|
/**
|
|
60
104
|
* @private
|
|
61
105
|
* @name sap.fe.templates.RootContainer.controller.NavContainer.getMetadata
|
|
@@ -84,90 +128,60 @@ sap.ui.define(
|
|
|
84
128
|
_scrollTablesToLastNavigatedItems: function() {},
|
|
85
129
|
|
|
86
130
|
displayMessagePage: function(sErrorMessage, mParameters) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
showHeader: false,
|
|
92
|
-
icon: "sap-icon://message-error"
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
oNavContainer.addPage(this.oMessagePage);
|
|
96
|
-
}
|
|
131
|
+
return new Promise(
|
|
132
|
+
function(resolve, reject) {
|
|
133
|
+
try {
|
|
134
|
+
var oNavContainer = this._getNavContainer();
|
|
97
135
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
new Link({
|
|
103
|
-
text: mParameters.description || mParameters.technicalMessage,
|
|
104
|
-
press: function() {
|
|
105
|
-
MessageBox.show(mParameters.technicalMessage, {
|
|
106
|
-
icon: MessageBox.Icon.ERROR,
|
|
107
|
-
title: mParameters.title,
|
|
108
|
-
actions: [MessageBox.Action.OK],
|
|
109
|
-
defaultAction: MessageBox.Action.OK,
|
|
110
|
-
details: mParameters.technicalDetails || "",
|
|
111
|
-
contentWidth: "60%"
|
|
136
|
+
if (!this.oMessagePage) {
|
|
137
|
+
this.oMessagePage = new MessagePage({
|
|
138
|
+
showHeader: false,
|
|
139
|
+
icon: "sap-icon://message-error"
|
|
112
140
|
});
|
|
141
|
+
|
|
142
|
+
oNavContainer.addPage(this.oMessagePage);
|
|
113
143
|
}
|
|
114
|
-
})
|
|
115
|
-
);
|
|
116
|
-
} else {
|
|
117
|
-
this.oMessagePage.setDescription(mParameters.description || "");
|
|
118
|
-
}
|
|
119
144
|
|
|
120
|
-
|
|
121
|
-
},
|
|
145
|
+
this.oMessagePage.setText(sErrorMessage);
|
|
122
146
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if (oPlaceholderMapping[oTarget.name]) {
|
|
144
|
-
if (!oPlaceholderTarget.view) {
|
|
145
|
-
oPlaceholderTarget.view = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
146
|
-
oRootContainer.addPage(oPlaceholderTarget.view);
|
|
147
|
-
}
|
|
147
|
+
if (mParameters.technicalMessage) {
|
|
148
|
+
this.oMessagePage.setCustomDescription(
|
|
149
|
+
new Link({
|
|
150
|
+
text: mParameters.description || mParameters.technicalMessage,
|
|
151
|
+
press: function() {
|
|
152
|
+
MessageBox.show(mParameters.technicalMessage, {
|
|
153
|
+
icon: MessageBox.Icon.ERROR,
|
|
154
|
+
title: mParameters.title,
|
|
155
|
+
actions: [MessageBox.Action.OK],
|
|
156
|
+
defaultAction: MessageBox.Action.OK,
|
|
157
|
+
details: mParameters.technicalDetails || "",
|
|
158
|
+
contentWidth: "60%"
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
);
|
|
163
|
+
} else {
|
|
164
|
+
this.oMessagePage.setDescription(mParameters.description || "");
|
|
165
|
+
}
|
|
148
166
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
if (mParameters.handleShellBack) {
|
|
168
|
+
var oErrorOriginPage = oNavContainer.getCurrentPage(),
|
|
169
|
+
oAppComponent = CommonUtils.getAppComponent(oNavContainer.getCurrentPage());
|
|
170
|
+
oAppComponent.getShellServices().setBackNavigation(function() {
|
|
171
|
+
oNavContainer.to(oErrorOriginPage.getId());
|
|
172
|
+
oAppComponent.getShellServices().setBackNavigation();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
oNavContainer.attachAfterNavigate(function() {
|
|
176
|
+
resolve(true);
|
|
177
|
+
});
|
|
178
|
+
oNavContainer.to(this.oMessagePage.getId());
|
|
179
|
+
} catch (e) {
|
|
180
|
+
reject(false);
|
|
181
|
+
Log.info(e);
|
|
158
182
|
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
(bPlaceholderScreenEnabledFirstTimeOnly && !oPlaceholderTarget.view.getController().istargetNavigated(oTarget)) ||
|
|
162
|
-
!bPlaceholderScreenEnabledFirstTimeOnly
|
|
163
|
-
) {
|
|
164
|
-
oPlaceholderTarget.view.getController().setPlaceholderOption(sStartupParameter);
|
|
165
|
-
oRootContainer.to(oPlaceholderTarget.view, "show");
|
|
166
|
-
bPlaceholderDisplayed = true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return bPlaceholderDisplayed;
|
|
183
|
+
}.bind(this)
|
|
184
|
+
);
|
|
171
185
|
}
|
|
172
186
|
});
|
|
173
187
|
},
|