@sapui5/sap.fe.templates 1.97.0 → 1.99.1

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 (102) hide show
  1. package/package.json +7 -5
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/Component.js +3 -2
  4. package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +5 -4
  5. package/src/sap/fe/templates/ListComponent.js +3 -2
  6. package/src/sap/fe/templates/ListReport/Component.js +11 -2
  7. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +12 -6
  8. package/src/sap/fe/templates/ListReport/ListReport.view.xml +13 -7
  9. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +193 -125
  10. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +18 -13
  11. package/src/sap/fe/templates/ListReport/overrides/Share.js +46 -29
  12. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +131 -86
  13. package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
  14. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +25 -4
  15. package/src/sap/fe/templates/ObjectPage/Component.js +20 -17
  16. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -2
  17. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +72 -94
  18. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +118 -140
  19. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +3 -2
  20. package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +3 -2
  21. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -2
  22. package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +3 -2
  23. package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +3 -2
  24. package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +3 -2
  25. package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +3 -2
  26. package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +3 -2
  27. package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +3 -2
  28. package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +3 -2
  29. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +3 -2
  30. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +15 -2
  31. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +50 -45
  32. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -22
  33. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
  34. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +2 -2
  35. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
  36. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +5 -1
  37. package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +33 -0
  38. package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingAvatar.fragment.xml +17 -0
  39. package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +18 -0
  40. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +24 -5
  41. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
  42. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
  43. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +4 -3
  44. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +4 -3
  45. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +3 -2
  46. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +3 -2
  47. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +136 -125
  48. package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +3 -2
  49. package/src/sap/fe/templates/TableScroller.js +3 -2
  50. package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
  51. package/src/sap/fe/templates/library.js +4 -3
  52. package/src/sap/fe/templates/messagebundle.properties +15 -8
  53. package/src/sap/fe/templates/messagebundle_ar.properties +24 -6
  54. package/src/sap/fe/templates/messagebundle_bg.properties +24 -6
  55. package/src/sap/fe/templates/messagebundle_ca.properties +24 -6
  56. package/src/sap/fe/templates/messagebundle_cs.properties +24 -6
  57. package/src/sap/fe/templates/messagebundle_cy.properties +24 -6
  58. package/src/sap/fe/templates/messagebundle_da.properties +24 -6
  59. package/src/sap/fe/templates/messagebundle_de.properties +24 -6
  60. package/src/sap/fe/templates/messagebundle_el.properties +25 -7
  61. package/src/sap/fe/templates/messagebundle_en.properties +24 -6
  62. package/src/sap/fe/templates/messagebundle_en_GB.properties +24 -6
  63. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +25 -7
  64. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +25 -7
  65. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +25 -7
  66. package/src/sap/fe/templates/messagebundle_es.properties +32 -14
  67. package/src/sap/fe/templates/messagebundle_es_MX.properties +24 -6
  68. package/src/sap/fe/templates/messagebundle_et.properties +24 -6
  69. package/src/sap/fe/templates/messagebundle_fi.properties +24 -6
  70. package/src/sap/fe/templates/messagebundle_fr.properties +25 -7
  71. package/src/sap/fe/templates/messagebundle_fr_CA.properties +24 -6
  72. package/src/sap/fe/templates/messagebundle_hi.properties +24 -6
  73. package/src/sap/fe/templates/messagebundle_hr.properties +25 -7
  74. package/src/sap/fe/templates/messagebundle_hu.properties +24 -6
  75. package/src/sap/fe/templates/messagebundle_id.properties +26 -8
  76. package/src/sap/fe/templates/messagebundle_it.properties +24 -6
  77. package/src/sap/fe/templates/messagebundle_iw.properties +24 -6
  78. package/src/sap/fe/templates/messagebundle_ja.properties +25 -7
  79. package/src/sap/fe/templates/messagebundle_kk.properties +24 -6
  80. package/src/sap/fe/templates/messagebundle_ko.properties +24 -6
  81. package/src/sap/fe/templates/messagebundle_lt.properties +24 -6
  82. package/src/sap/fe/templates/messagebundle_lv.properties +24 -6
  83. package/src/sap/fe/templates/messagebundle_ms.properties +24 -6
  84. package/src/sap/fe/templates/messagebundle_nl.properties +24 -6
  85. package/src/sap/fe/templates/messagebundle_no.properties +24 -6
  86. package/src/sap/fe/templates/messagebundle_pl.properties +24 -6
  87. package/src/sap/fe/templates/messagebundle_pt.properties +27 -9
  88. package/src/sap/fe/templates/messagebundle_pt_PT.properties +25 -7
  89. package/src/sap/fe/templates/messagebundle_ro.properties +24 -6
  90. package/src/sap/fe/templates/messagebundle_ru.properties +24 -6
  91. package/src/sap/fe/templates/messagebundle_sh.properties +24 -6
  92. package/src/sap/fe/templates/messagebundle_sk.properties +24 -6
  93. package/src/sap/fe/templates/messagebundle_sl.properties +24 -6
  94. package/src/sap/fe/templates/messagebundle_sv.properties +25 -7
  95. package/src/sap/fe/templates/messagebundle_th.properties +24 -6
  96. package/src/sap/fe/templates/messagebundle_tr.properties +25 -7
  97. package/src/sap/fe/templates/messagebundle_uk.properties +25 -7
  98. package/src/sap/fe/templates/messagebundle_vi.properties +24 -6
  99. package/src/sap/fe/templates/messagebundle_zh_CN.properties +24 -6
  100. package/src/sap/fe/templates/messagebundle_zh_TW.properties +24 -6
  101. package/ui5.yaml +0 -3
  102. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
@@ -79,107 +79,85 @@
79
79
  />
80
80
  </uxap:dependents>
81
81
  <template:if test="{converterContext>header/visible}">
82
- <uxap:headerTitle>
83
- <uxap:ObjectPageDynamicHeaderTitle primaryArea="Begin">
84
- <uxap:expandedHeading>
82
+ <template:with path="converterContext>header" var="header">
83
+ <uxap:headerTitle>
84
+ <uxap:ObjectPageDynamicHeaderTitle primaryArea="Begin">
85
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Heading" type="XML" />
86
+ <uxap:expandedContent>
85
87
  <FlexBox>
86
- <FlexBox visible="{converterContext>header/title/expandedImageVisible}">
87
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
88
- </FlexBox>
89
- <template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
90
- <Title
91
- text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
92
- wrapping="true"
93
- />
94
- </template:with>
95
- </FlexBox>
96
- </uxap:expandedHeading>
97
- <uxap:snappedHeading>
98
- <FlexBox>
99
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
100
- <template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
101
- <Title
102
- text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
103
- wrapping="true"
104
- />
105
- </template:with>
88
+ <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
89
+ <Label
90
+ text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
91
+ wrapping="true"
92
+ />
93
+ </template:if>
106
94
  </FlexBox>
107
- </uxap:snappedHeading>
108
- <uxap:expandedContent>
109
- <FlexBox>
110
- <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
111
- <Label
112
- text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
113
- wrapping="true"
114
- />
115
- </template:if>
116
- </FlexBox>
117
- </uxap:expandedContent>
118
- <uxap:snappedContent>
119
- <FlexBox>
120
- <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
121
- <Label
122
- text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
123
- wrapping="true"
124
- />
125
- </template:if>
126
- </FlexBox>
127
- </uxap:snappedContent>
128
- <uxap:content>
129
- <template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot}">
130
- <macro:DraftIndicator DraftIndicatorType="IconOnly" class="sapUiTinyMarginBegin sapMTB sapMTBNewFlex" entitySet="{entitySet>}" />
131
- </template:if>
132
- </uxap:content>
133
- <uxap:navigationActions>
134
- <template:if test="{= ${viewData>/viewLevel} > 1}">
135
- <macro:Paginator id="fe::Paginator" />
136
- </template:if>
137
- <!-- Flexible column layout menu-->
138
- <template:if test="{= ${viewData>/fclEnabled} }">
139
- <macro:FlexibleColumnLayoutActions />
140
- </template:if>
141
- </uxap:navigationActions>
142
- <uxap:actions>
143
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Actions" type="XML" />
144
- </uxap:actions>
145
- <uxap:breadcrumbs>
146
- <Breadcrumbs
147
- unittest:id="BreadcrumbsTest"
148
- visible="{= OP.getVisibleExpressionForBreadcrumbs(${viewData>/}) }"
149
- modelContextChange="._setBreadcrumbLinks(${$source>/})"
150
- id="fe::Breadcrumbs"
95
+ </uxap:expandedContent>
96
+ <uxap:snappedContent>
97
+ <FlexBox>
98
+ <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
99
+ <Label
100
+ text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
101
+ wrapping="true"
102
+ />
103
+ </template:if>
104
+ </FlexBox>
105
+ </uxap:snappedContent>
106
+ <uxap:content>
107
+ <template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot}">
108
+ <macro:DraftIndicator DraftIndicatorType="IconOnly" class="sapUiTinyMarginBegin sapMTB sapMTBNewFlex" entitySet="{entitySet>}" />
109
+ </template:if>
110
+ <internal:SituationsIndicator xmlns:internal="sap.fe.macros.internal" entitySet="{entitySet>}" />
111
+ </uxap:content>
112
+ <uxap:navigationActions>
113
+ <template:if test="{= ${viewData>/viewLevel} > 1}">
114
+ <macro:Paginator id="fe::Paginator" />
115
+ </template:if>
116
+ <!-- Flexible column layout menu-->
117
+ <template:if test="{= ${viewData>/fclEnabled} }">
118
+ <macro:FlexibleColumnLayoutActions />
119
+ </template:if>
120
+ </uxap:navigationActions>
121
+ <uxap:actions>
122
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Actions" type="XML" />
123
+ </uxap:actions>
124
+ <uxap:breadcrumbs>
125
+ <Breadcrumbs
126
+ unittest:id="BreadcrumbsTest"
127
+ visible="{= OP.getVisibleExpressionForBreadcrumbs(${viewData>/}) }"
128
+ modelContextChange="._setBreadcrumbLinks(${$source>/})"
129
+ id="fe::Breadcrumbs"
130
+ >
131
+ </Breadcrumbs>
132
+ </uxap:breadcrumbs>
133
+ </uxap:ObjectPageDynamicHeaderTitle>
134
+ </uxap:headerTitle>
135
+ <template:if test="{header>hasContent}">
136
+ <uxap:headerContent>
137
+ <FlexBox
138
+ id="fe::HeaderContentContainer"
139
+ unittest:id="FlexBoxTest"
140
+ dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
141
+ wrap="Wrap"
142
+ fitContainer="true"
143
+ alignItems="Stretch"
151
144
  >
152
- </Breadcrumbs>
153
- </uxap:breadcrumbs>
154
- </uxap:ObjectPageDynamicHeaderTitle>
155
- </uxap:headerTitle>
156
- <template:if test="{converterContext>header/hasContent}">
157
- <uxap:headerContent>
158
- <FlexBox
159
- id="fe::HeaderContentContainer"
160
- unittest:id="FlexBoxTest"
161
- dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
162
- wrap="Wrap"
163
- fitContainer="true"
164
- alignItems="Stretch"
165
- >
166
- <template:if test="{converterContext>header/avatar}">
167
- <template:with path="converterContext>header/avatar" var="avatar">
168
- <Avatar
145
+ <template:if test="{header>avatar}">
146
+ <Avatar
169
147
  unittest:id="AvatarOPHeaderContent"
170
148
  class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
171
- src="{avatar>src}"
172
- initials="{avatar>initials}"
173
- fallbackIcon="{avatar>fallbackIcon}"
174
- displayShape="{avatar>displayShape}"
149
+ src="{header>avatar/src}"
150
+ initials="{header>avatar/initials}"
151
+ fallbackIcon="{header>avatar/fallbackIcon}"
152
+ displayShape="{header>avatar/displayShape}"
175
153
  displaySize="XL"
176
154
  />
177
- </template:with>
178
- </template:if>
179
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderContent" type="XML" />
180
- </FlexBox>
181
- </uxap:headerContent>
182
- </template:if>
155
+ </template:if>
156
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderContent" type="XML" />
157
+ </FlexBox>
158
+ </uxap:headerContent>
159
+ </template:if>
160
+ </template:with>
183
161
  </template:if>
184
162
  <uxap:sections>
185
163
  <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Section" type="XML" />
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
7
8
  "sap/fe/core/PageController",
8
9
  "sap/fe/core/controllerextensions/InternalRouting",
9
10
  "./overrides/InternalRouting",
10
- "sap/fe/core/controllerextensions/SideEffects",
11
11
  "sap/fe/core/controllerextensions/EditFlow",
12
12
  "sap/fe/core/controllerextensions/InternalEditFlow",
13
13
  "sap/fe/core/controllerextensions/PageReady",
@@ -41,13 +41,14 @@ sap.ui.define(
41
41
  "sap/ui/model/json/JSONModel",
42
42
  "sap/fe/core/controllerextensions/Paginator",
43
43
  "./overrides/Paginator",
44
- "sap/fe/core/controllerextensions/Placeholder"
44
+ "sap/fe/core/controllerextensions/Placeholder",
45
+ "sap/base/util/UriParameters",
46
+ "sap/fe/core/controllerextensions/MassEdit"
45
47
  ],
46
48
  function(
47
49
  PageController,
48
50
  InternalRouting,
49
51
  InternalRoutingOverride,
50
- SideEffects,
51
52
  EditFlow,
52
53
  InternalEditFlow,
53
54
  PageReady,
@@ -81,7 +82,9 @@ sap.ui.define(
81
82
  JSONModel,
82
83
  Paginator,
83
84
  PaginatorOverride,
84
- Placeholder
85
+ Placeholder,
86
+ UriParameters,
87
+ MassEdit
85
88
  ) {
86
89
  "use strict";
87
90
 
@@ -100,7 +103,6 @@ sap.ui.define(
100
103
  }
101
104
  },
102
105
  placeholder: Placeholder,
103
- sideEffects: SideEffects,
104
106
  editFlow: EditFlow,
105
107
  share: Share.override(ShareOverrides),
106
108
  _editFlow: InternalEditFlow.override(EditFlowOverrides),
@@ -112,7 +114,7 @@ sap.ui.define(
112
114
  getNavigationMode: function() {
113
115
  var bIsStickyEditMode =
114
116
  this._oView.getController().getStickyEditMode && this._oView.getController().getStickyEditMode();
115
- return bIsStickyEditMode ? "explace" : "inplace";
117
+ return bIsStickyEditMode ? "explace" : undefined;
116
118
  }
117
119
  }),
118
120
  viewState: ViewState.override(ViewStateOverrides),
@@ -121,6 +123,7 @@ sap.ui.define(
121
123
  return true;
122
124
  }
123
125
  }),
126
+ massEdit: MassEdit,
124
127
 
125
128
  getExtensionAPI: function(sId) {
126
129
  if (sId) {
@@ -152,7 +155,7 @@ sap.ui.define(
152
155
  });
153
156
  oInternalModelContext.setProperty("batchGroups", this._getBatchGroupsForView());
154
157
  oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
155
- if (oObjectPage.getEnableLazyLoading()) {
158
+ if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
156
159
  //Attaching the event to make the subsection context binding active when it is visible.
157
160
  oObjectPage.attachEvent("subSectionEnteredViewPort", this._handleSubSectionEnteredViewPort.bind(this));
158
161
  }
@@ -203,8 +206,8 @@ sap.ui.define(
203
206
  aTables = this._findTables(),
204
207
  oFastCreationRow,
205
208
  oObjectPage = this.byId("fe::ObjectPage"),
206
- oBinding = mParameters.listBinding,
207
209
  oInternalModelContext = that.getView().getBindingContext("internal"),
210
+ oInternalModel = that.getView().getModel("internal"),
208
211
  aBatchGroups = oInternalModelContext.getProperty("batchGroups"),
209
212
  iViewLevel = this.getView().getViewData().viewLevel;
210
213
 
@@ -260,29 +263,37 @@ sap.ui.define(
260
263
  });
261
264
 
262
265
  //Set the Binding for Paginators using ListBinding ID
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
- });
266
+ if (iViewLevel > 1) {
267
+ var oBinding = mParameters && mParameters.listBinding,
268
+ oPaginatorCurrentContext = oInternalModel.getProperty("/paginatorCurrentContext");
269
+ if (oPaginatorCurrentContext) {
270
+ var oBindingToUse = oPaginatorCurrentContext.getBinding();
271
+ this.paginator.initialize(oBindingToUse, oPaginatorCurrentContext);
272
+ oInternalModel.setProperty("/paginatorCurrentContext", null);
273
+ } else if (oBinding) {
274
+ if (oBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
275
+ this.paginator.initialize(oBinding, oContext);
276
+ } else {
277
+ //if the binding type is not ODataListBinding because of a deeplink navigation or a refresh of the page
278
+ // we need to create it
279
+ var sContextPath = oBinding.getPath().replace(/\([^\)]*\)*$/, ""); //removing the last tuple
280
+ oBinding = new sap.ui.model.odata.v4.ODataListBinding(
281
+ oBinding.oModel,
282
+ "",
283
+ oBinding.oModel.createBindingContext(sContextPath)
284
+ );
285
+
286
+ oBinding.getContexts(0);
287
+ oBinding.attachEvent("change", function _setListBindingAsync() {
288
+ if (oBinding.getContexts().length > 0) {
289
+ that.paginator.initialize(oBinding, oContext);
290
+ oBinding.detachEvent("change", _setListBindingAsync);
291
+ }
292
+ });
293
+ }
283
294
  }
284
295
  }
285
- if (oObjectPage.getEnableLazyLoading()) {
296
+ if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
286
297
  var aSections = oObjectPage.getSections(),
287
298
  bUseIconTabBar = oObjectPage.getUseIconTabBar(),
288
299
  iSkip = 2,
@@ -295,7 +306,9 @@ sap.ui.define(
295
306
  // In IconTabBar mode keep the second section bound if there is an editable header and we are switching to display mode
296
307
  if (iSkip < 1 || (bUseIconTabBar && (iSection > 1 || (iSection === 1 && !bEditableHeader && !bIsInEditMode)))) {
297
308
  var oSubSection = aSubSections[iSubSection];
298
- oSubSection.setBindingContext(null);
309
+ if (oSubSection.data().isVisibilityDynamic !== "true") {
310
+ oSubSection.setBindingContext(null);
311
+ }
299
312
  }
300
313
  }
301
314
  }
@@ -322,30 +335,39 @@ sap.ui.define(
322
335
  },
323
336
 
324
337
  _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();
338
+ if (aSubSections) {
339
+ for (var subSection = 0; subSection < aSubSections.length; subSection++) {
340
+ var aBlocks = aSubSections[subSection].getBlocks();
341
+
342
+ if (aBlocks) {
343
+ for (var block = 0; block < aBlocks.length; block++) {
344
+ var aFormContainers;
345
+
346
+ if (aBlocks[block].isA("sap.ui.layout.form.Form")) {
347
+ aFormContainers = aBlocks[block].getFormContainers();
348
+ } else if (
349
+ aBlocks[block].getContent &&
350
+ aBlocks[block].getContent() &&
351
+ aBlocks[block].getContent().isA("sap.ui.layout.form.Form")
352
+ ) {
353
+ aFormContainers = aBlocks[block].getContent().getFormContainers();
354
+ }
346
355
 
347
- if (aFields[0].getRequired() && !aFields[0].getValue()) {
348
- return aFields[0];
356
+ if (aFormContainers) {
357
+ for (var formContainer = 0; formContainer < aFormContainers.length; formContainer++) {
358
+ var aFormElements = aFormContainers[formContainer].getFormElements();
359
+ if (aFormElements) {
360
+ for (var formElement = 0; formElement < aFormElements.length; formElement++) {
361
+ var aFields = aFormElements[formElement].getFields();
362
+
363
+ // The first field is not necessarily an InputBase (e.g. could be a Text)
364
+ // So we need to check whether it has a getRequired method
365
+ if (aFields[0].getRequired && aFields[0].getRequired() && !aFields[0].getValue()) {
366
+ return aFields[0];
367
+ }
368
+ }
369
+ }
370
+ }
349
371
  }
350
372
  }
351
373
  }
@@ -379,24 +401,32 @@ sap.ui.define(
379
401
  },
380
402
 
381
403
  _onBackNavigationInDraft: function(oContext) {
382
- CommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(
383
- function() {
384
- history.back();
385
- },
386
- Function.prototype,
387
- oContext,
388
- this.getView().getController(),
389
- false
390
- );
404
+ if (
405
+ this.getAppComponent()
406
+ .getRouterProxy()
407
+ .checkIfBackHasSameContext()
408
+ ) {
409
+ // Back nav will keep the same context --> no need to display the dialog
410
+ history.back();
411
+ } else {
412
+ CommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(
413
+ function() {
414
+ history.back();
415
+ },
416
+ Function.prototype,
417
+ oContext,
418
+ this,
419
+ false
420
+ );
421
+ }
391
422
  },
392
423
 
393
424
  _onAfterBinding: function(oBindingContext, mParameters) {
394
425
  var oObjectPage = this.byId("fe::ObjectPage"),
395
426
  that = this,
396
- aTables = this._findTables(),
397
- aFormContainers = this._findFormContainers();
427
+ aTables = this._findTables();
398
428
 
399
- this.sideEffects.clearPropertiesStatus();
429
+ this._sideEffects.clearPropertiesStatus();
400
430
 
401
431
  // TODO: this is only a temp solution as long as the model fix the cache issue and we use this additional
402
432
  // binding with ownRequest
@@ -415,25 +445,6 @@ sap.ui.define(
415
445
  // 2. Another problem is, that FormContainers assigned to a 'MoreBlock' does not have an
416
446
  // internal model context at all.
417
447
 
418
- aFormContainers.forEach(function(oFormContainer) {
419
- var oInternalModelContext,
420
- oInternalModel = oObjectPage.getModel("internal"),
421
- sPageContextPath = "/pages/" + that.getView().getId(),
422
- sFormContainerContextPath = "controls/" + that.getView().getLocalId(oFormContainer.getId()),
423
- SHOW_DETAILS = "showDetails";
424
- if (oFormContainer.getModel("internal") === undefined) {
425
- oFormContainer.setModel(oInternalModel, "internal");
426
- oFormContainer.setBindingContext(
427
- oInternalModel.createBindingContext(sPageContextPath + "/" + sFormContainerContextPath),
428
- "internal"
429
- );
430
- oFormContainer.bindElement({ path: "", model: "internal" });
431
- } else {
432
- oFormContainer.bindElement({ path: sFormContainerContextPath, model: "internal" });
433
- }
434
- oInternalModelContext = oFormContainer.getBindingContext("internal");
435
- oInternalModelContext.setProperty(SHOW_DETAILS, false);
436
- });
437
448
  aTables.forEach(function(oTable) {
438
449
  var oInternalModelContext = oTable.getBindingContext("internal");
439
450
  oInternalModelContext.setProperty("creationRowFieldValidity", {});
@@ -574,8 +585,10 @@ sap.ui.define(
574
585
  });
575
586
  });
576
587
 
577
- // should be called only after binding is ready hence calling it in onAfterBinding
578
- oObjectPage._triggerVisibleSubSectionsEvents();
588
+ if (!this.getView().getViewData().useNewLazyLoading) {
589
+ // should be called only after binding is ready hence calling it in onAfterBinding
590
+ oObjectPage._triggerVisibleSubSectionsEvents();
591
+ }
579
592
  }
580
593
  },
581
594
  onPageReady: function(mParameters) {
@@ -666,7 +679,7 @@ sap.ui.define(
666
679
  icon: ""
667
680
  };
668
681
 
669
- return Promise.resolve(oTitleInfo);
682
+ return oTitleInfo;
670
683
  },
671
684
 
672
685
  _executeHeaderShortcut: function(sId) {
@@ -792,20 +805,19 @@ sap.ui.define(
792
805
  );
793
806
  }
794
807
  });
795
- return Promise.all(aWaitCreateDocuments).then(function(aBindings) {
796
- var mParameters = {
797
- bExecuteSideEffectsOnError: bExecuteSideEffectsOnError,
798
- bindings: aBindings
799
- };
800
- return that.editFlow
801
- .saveDocument(oContext, mParameters)
802
- .catch(that._showMessagePopover.bind(that))
803
- .finally(function() {
804
- if (BusyLocker.isLocked(oModel)) {
805
- BusyLocker.unlock(oModel);
806
- }
807
- });
808
- });
808
+ return Promise.all(aWaitCreateDocuments)
809
+ .then(function(aBindings) {
810
+ var mParameters = {
811
+ bExecuteSideEffectsOnError: bExecuteSideEffectsOnError,
812
+ bindings: aBindings
813
+ };
814
+ return that.editFlow.saveDocument(oContext, mParameters).catch(that._showMessagePopover.bind(that));
815
+ })
816
+ .finally(function() {
817
+ if (BusyLocker.isLocked(oModel)) {
818
+ BusyLocker.unlock(oModel);
819
+ }
820
+ });
809
821
  },
810
822
 
811
823
  _cancelDocument: function(oContext, mParameters) {
@@ -886,37 +898,6 @@ sap.ui.define(
886
898
  return aBlocks;
887
899
  },
888
900
 
889
- _findFormContainers: function() {
890
- var aSubSections = this._getAllSubSections(),
891
- aFormContainers = [];
892
-
893
- function _collectFormContainersInBlocks(aBlocks) {
894
- for (var i = 0; i < aBlocks.length; i++) {
895
- var oElement = aBlocks[i].getContent instanceof Function && aBlocks[i].getContent();
896
- if (oElement && oElement.isA && oElement.isA("sap.ui.layout.DynamicSideContent")) {
897
- oElement = oElement.getMainContent instanceof Function && oElement.getMainContent();
898
- if (oElement && oElement.length > 0) {
899
- oElement = oElement[0];
900
- }
901
- }
902
- if (
903
- oElement &&
904
- oElement.isA &&
905
- oElement.isA("sap.ui.layout.form.Form") &&
906
- oElement.getFormContainers instanceof Function
907
- ) {
908
- aFormContainers = aFormContainers.concat(oElement.getFormContainers());
909
- }
910
- }
911
- }
912
-
913
- for (var i = 0; i < aSubSections.length; i++) {
914
- _collectFormContainersInBlocks(aSubSections[i].getBlocks());
915
- _collectFormContainersInBlocks(aSubSections[i].getMoreBlocks());
916
- }
917
- return aFormContainers;
918
- },
919
-
920
901
  //TODO: This is needed for two workarounds - to be removed again
921
902
  _findTables: function() {
922
903
  var aSubSections = this._getAllSubSections(),
@@ -1088,7 +1069,6 @@ sap.ui.define(
1088
1069
  aPathParts.forEach(function(sPathPart, i) {
1089
1070
  sPath += "/" + sPathPart;
1090
1071
  var oRootViewController = oAppComponent.getRootViewController();
1091
- var oTitleHierarchyCache = oRootViewController.getTitleHierarchyCache();
1092
1072
  var pWaitForTitleHiearchyInfo;
1093
1073
  var sParameterPath = oMetaModel.getMetaPath(sPath);
1094
1074
  var bResultContext = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
@@ -1097,11 +1077,9 @@ sap.ui.define(
1097
1077
  iSkipParameterized = 1;
1098
1078
  return;
1099
1079
  }
1100
- if (!oTitleHierarchyCache[sPath]) {
1101
- pWaitForTitleHiearchyInfo = oRootViewController.addNewEntryInCacheTitle(sPath, oAppComponent);
1102
- } else {
1103
- pWaitForTitleHiearchyInfo = Promise.resolve(oTitleHierarchyCache[sPath]);
1104
- }
1080
+
1081
+ pWaitForTitleHiearchyInfo = oRootViewController.getTitleInfoFromPath(sPath);
1082
+
1105
1083
  pWaitForTitleHiearchyInfo
1106
1084
  .then(function(oTitleHiearchyInfo) {
1107
1085
  var idx = i - iSkipParameterized,
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  ["sap/m/HBox", "sap/m/HBoxRenderer", "sap/ui/core/StashedControlSupport"],
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  ["sap/m/VBox", "sap/m/VBoxRenderer", "sap/ui/core/StashedControlSupport"],
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
 
6
7
  sap.ui.define(["sap/uxap/BlockBase"], function(BlockBase) {
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  // Provides the Design Time Metadata for the sap.m.FlexBox control
6
7
  sap.ui.define([], function() {
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
 
6
7
  // Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableHBox control
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
 
6
7
  // Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableVBox control