@sapui5/sap.fe.core 1.136.11 → 1.136.13
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 +1 -1
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppStateHandler.js +8 -2
- package/src/sap/fe/core/AppStateHandler.ts +9 -1
- package/src/sap/fe/core/TemplateComponent.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +1 -3
- package/src/sap/fe/core/controllerextensions/EditFlow.js +73 -23
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +113 -43
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +7 -4
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +8 -5
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +1 -1
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +1 -0
- package/src/sap/fe/core/controllerextensions/Routing.js +6 -2
- package/src/sap/fe/core/controllerextensions/Routing.ts +4 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +8 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +8 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/ODataOperation.js +2 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations/ODataOperation.ts +1 -0
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +6 -5
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +15 -5
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.js +29 -1
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.tsx +32 -0
- package/src/sap/fe/core/converters/controls/Common/Action.js +3 -2
- package/src/sap/fe/core/converters/controls/Common/Action.ts +2 -1
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +31 -36
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +47 -57
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +4 -3
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +3 -2
- package/src/sap/fe/core/formatters/FPMFormatter.js +2 -2
- package/src/sap/fe/core/formatters/FPMFormatter.ts +1 -1
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/helpers/ModelHelper.js +4 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +4 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/messagebundle_da.properties +1 -1
- package/src/sap/fe/core/messagebundle_ko.properties +3 -3
- package/src/sap/fe/core/messagebundle_uk.properties +2 -2
- package/src/sap/fe/core/messagebundle_vi.properties +4 -4
- package/src/sap/fe/core/rootView/Fcl.controller.js +1 -1
- package/src/sap/fe/core/rootView/Fcl.controller.ts +6 -1
- package/src/sap/fe/core/services/CollaborationManagerServiceFactory.js +17 -29
- package/src/sap/fe/core/services/CollaborationManagerServiceFactory.ts +23 -26
- package/src/sap/fe/core/services/RoutingServiceFactory.js +9 -5
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +12 -6
|
@@ -70,7 +70,7 @@ import type { MetaModelEntityType } from "types/metamodel_types";
|
|
|
70
70
|
import ActionRuntime from "../ActionRuntime";
|
|
71
71
|
import { ConfirmRecommendationDialog, RecommendationDialogDecision } from "../controls/Recommendations/ConfirmRecommendationDialog";
|
|
72
72
|
import { CreationMode, type BaseManifestSettings } from "../converters/ManifestSettings";
|
|
73
|
-
import { isFulfilled } from "../helpers/TypeGuards";
|
|
73
|
+
import { isFulfilled, isRejected } from "../helpers/TypeGuards";
|
|
74
74
|
import draftDataLossPopup from "./editFlow/draftDataLossPopup";
|
|
75
75
|
import type { OperationResult } from "./editFlow/operations/ODataOperation";
|
|
76
76
|
import NavigationReason from "./routing/NavigationReason";
|
|
@@ -103,6 +103,7 @@ type InternalCreateParameters = {
|
|
|
103
103
|
skipSideEffects?: boolean;
|
|
104
104
|
selectedContexts?: ODataV4Context[];
|
|
105
105
|
creationDialogFields?: string[];
|
|
106
|
+
requestAtLeast?: string[];
|
|
106
107
|
};
|
|
107
108
|
|
|
108
109
|
/**
|
|
@@ -298,14 +299,24 @@ class EditFlow extends BaseControllerExtension {
|
|
|
298
299
|
ignoreTransientContexts = false
|
|
299
300
|
): boolean {
|
|
300
301
|
if (parentContext) {
|
|
301
|
-
const
|
|
302
|
-
|
|
302
|
+
const listBindingRelativePathToPage = ModelHelper.getRelativeMetaPathForListBinding(parentContext, listBinding);
|
|
303
|
+
const listBindingRelativePath = ModelHelper.getRelativeMetaPathForListBinding(listBinding.getContext(), listBinding);
|
|
304
|
+
if (ignoreTransientContexts || !CommonUtils.hasTransientContext(listBinding)) {
|
|
303
305
|
// if there are transient contexts (and we don't ignore this check), we must avoid requesting side effects
|
|
304
306
|
// this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
|
|
305
307
|
// if list binding is refreshed, transient contexts might be lost
|
|
306
|
-
|
|
307
|
-
.
|
|
308
|
-
|
|
308
|
+
if (listBindingRelativePath) {
|
|
309
|
+
this.getAppComponent()
|
|
310
|
+
.getSideEffectsService()
|
|
311
|
+
.requestSideEffectsForNavigationProperty(listBindingRelativePath, listBinding.getContext());
|
|
312
|
+
}
|
|
313
|
+
// if we are triggering side effects for a multivaluefield within a table, listBindingRelativePathToPage is different to listBindingRelativePath
|
|
314
|
+
// so we also ensure page side effects are triggered if need be
|
|
315
|
+
if (listBindingRelativePathToPage && listBindingRelativePathToPage !== listBindingRelativePath) {
|
|
316
|
+
this.getAppComponent()
|
|
317
|
+
.getSideEffectsService()
|
|
318
|
+
.requestSideEffectsForNavigationProperty(listBindingRelativePathToPage, parentContext);
|
|
319
|
+
}
|
|
309
320
|
|
|
310
321
|
return true;
|
|
311
322
|
}
|
|
@@ -525,6 +536,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
525
536
|
* @param mInParameters.selectedContexts The contexts that are selected in the table initiating the creation. Used in case of a TreeTable to determine the parent context of the created document
|
|
526
537
|
* @param mInParameters.singleDraftForCreate When enabled, an extra request checks if any drafts exist that were never saved. If unsaved drafts are found, the newest one is opened. If no unsaved drafts are found, a new entity is created
|
|
527
538
|
* @param mInParameters.creationDialogFields Defines the list of properties that are displayed in the creation dialog when the creation mode is set to 'CreationDialog'.<br/>The value is a comma-separated list of property names
|
|
539
|
+
* @param mInParameters.requestAtLeast PRIVATE - Defines the list of properties that should be requested when creating the new document to avoid additional requests later on.<br/>The value is an array of property names
|
|
528
540
|
* @returns Promise resolves once the object has been created
|
|
529
541
|
* @public
|
|
530
542
|
* @since 1.90.0
|
|
@@ -549,6 +561,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
549
561
|
selectedContexts?: ODataV4Context[];
|
|
550
562
|
singleDraftForCreate?: boolean;
|
|
551
563
|
creationDialogFields?: string[];
|
|
564
|
+
requestAtLeast?: string[];
|
|
552
565
|
}
|
|
553
566
|
): Promise<void> {
|
|
554
567
|
let oDataListBinding!: ODataListBinding;
|
|
@@ -657,13 +670,17 @@ class EditFlow extends BaseControllerExtension {
|
|
|
657
670
|
case CreationMode.External:
|
|
658
671
|
return this.createExternalDocument(vListBinding, parameters.outbound);
|
|
659
672
|
case CreationMode.Deferred:
|
|
660
|
-
return this.createDeferredDocument(
|
|
673
|
+
return this.createDeferredDocument(
|
|
674
|
+
{ parentContext, data: parameters.data, requestAtLeast: parameters.requestAtLeast },
|
|
675
|
+
oDataListBinding
|
|
676
|
+
);
|
|
661
677
|
case CreationMode.CreationRow:
|
|
662
678
|
return parameters.creationRow
|
|
663
679
|
? this.createCreateRowDocument({
|
|
664
680
|
creationRow: parameters.creationRow,
|
|
665
681
|
skipSideEffects: parameters.skipSideEffects,
|
|
666
|
-
createAtEnd: parameters.createAtEnd
|
|
682
|
+
createAtEnd: parameters.createAtEnd,
|
|
683
|
+
requestAtLeast: parameters.requestAtLeast
|
|
667
684
|
})
|
|
668
685
|
: undefined;
|
|
669
686
|
case CreationMode.Inline:
|
|
@@ -674,7 +691,8 @@ class EditFlow extends BaseControllerExtension {
|
|
|
674
691
|
createAtEnd: parameters.createAtEnd,
|
|
675
692
|
skipSideEffects: parameters.skipSideEffects,
|
|
676
693
|
parentContext,
|
|
677
|
-
data: parameters.data
|
|
694
|
+
data: parameters.data,
|
|
695
|
+
requestAtLeast: parameters.requestAtLeast
|
|
678
696
|
},
|
|
679
697
|
oDataListBinding
|
|
680
698
|
);
|
|
@@ -690,7 +708,8 @@ class EditFlow extends BaseControllerExtension {
|
|
|
690
708
|
skipSideEffects: parameters.skipSideEffects,
|
|
691
709
|
parentContext,
|
|
692
710
|
data: parameters.data,
|
|
693
|
-
creationDialogFields: parameters.creationDialogFields
|
|
711
|
+
creationDialogFields: parameters.creationDialogFields,
|
|
712
|
+
requestAtLeast: parameters.requestAtLeast
|
|
694
713
|
},
|
|
695
714
|
oDataListBinding
|
|
696
715
|
);
|
|
@@ -718,6 +737,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
718
737
|
bFromDeferred: parameters.bFromDeferred,
|
|
719
738
|
skipSideEffects: parameters.skipSideEffects,
|
|
720
739
|
createAction: parameters.createAction,
|
|
740
|
+
requestAtLeast: parameters.requestAtLeast,
|
|
721
741
|
parentContext
|
|
722
742
|
},
|
|
723
743
|
oDataListBinding
|
|
@@ -728,16 +748,30 @@ class EditFlow extends BaseControllerExtension {
|
|
|
728
748
|
}
|
|
729
749
|
|
|
730
750
|
/**
|
|
731
|
-
*Executes the mandatory configuration after the document has been created.
|
|
751
|
+
* Executes the mandatory configuration after the document has been created.
|
|
732
752
|
* @param prerequisite Promise of the document creation and the following navigation
|
|
733
753
|
* @param listBinding ODataListBinding where the document is created
|
|
734
754
|
* @returns Promise resolves once the configuration is done
|
|
735
755
|
*/
|
|
736
|
-
async postDocumentCreation(
|
|
756
|
+
async postDocumentCreation(
|
|
757
|
+
prerequisite: Promise<[PromiseSettledResult<Context>, PromiseSettledResult<unknown>]>,
|
|
758
|
+
listBinding: ODataListBinding
|
|
759
|
+
): Promise<void> {
|
|
737
760
|
const programmingModel: string = this.getProgrammingModel(listBinding);
|
|
738
761
|
const model = listBinding.getModel();
|
|
739
|
-
const
|
|
740
|
-
|
|
762
|
+
const results = await prerequisite;
|
|
763
|
+
|
|
764
|
+
// Check if creation or navigation failed and throw the respective error
|
|
765
|
+
const creation = results[0];
|
|
766
|
+
if (isRejected(creation)) {
|
|
767
|
+
throw creation.reason;
|
|
768
|
+
}
|
|
769
|
+
const navigation = results[1];
|
|
770
|
+
if (isRejected(navigation)) {
|
|
771
|
+
throw navigation.reason;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
const newDocumentContext = creation.value;
|
|
741
775
|
this._setStickySessionInternalProperties(programmingModel, model);
|
|
742
776
|
await this.base.editFlow.onAfterCreate({ context: newDocumentContext });
|
|
743
777
|
this.setEditMode(EditMode.Editable); // The createMode flag will be set in computeModelsForEditMode
|
|
@@ -785,12 +819,14 @@ class EditFlow extends BaseControllerExtension {
|
|
|
785
819
|
* @param parameters.createAtEnd The new document is created at the end.
|
|
786
820
|
* @param parameters.creationRow The creation row
|
|
787
821
|
* @param parameters.skipSideEffects The sideEffects are requested
|
|
822
|
+
* @param parameters.requestAtLeast Defines the list of properties that should be requested when creating the new document to avoid additional requests later on.
|
|
788
823
|
* @returns Promise resolves once the document has been created
|
|
789
824
|
*/
|
|
790
825
|
async createCreateRowDocument(parameters: {
|
|
791
826
|
createAtEnd?: boolean;
|
|
792
827
|
creationRow: CreationRow;
|
|
793
828
|
skipSideEffects?: boolean;
|
|
829
|
+
requestAtLeast?: string[];
|
|
794
830
|
}): Promise<void> {
|
|
795
831
|
let creation: Promise<Context>;
|
|
796
832
|
const appComponent = this.getAppComponent();
|
|
@@ -855,7 +891,8 @@ class EditFlow extends BaseControllerExtension {
|
|
|
855
891
|
beforeCreateCallBack: this.base.editFlow.onBeforeCreate,
|
|
856
892
|
skipParameterDialog: appComponent.getStartupMode() === StartupMode.AutoCreate, // In case the application was called with preferredMode=autoCreateWith, we want to skip the action parameter dialog
|
|
857
893
|
createAtEnd: parameters.createAtEnd,
|
|
858
|
-
creationMode: CreationMode.CreationRow
|
|
894
|
+
creationMode: CreationMode.CreationRow,
|
|
895
|
+
requestAtLeast: parameters.requestAtLeast
|
|
859
896
|
},
|
|
860
897
|
appComponent,
|
|
861
898
|
this._getResourceModel(),
|
|
@@ -878,7 +915,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
878
915
|
Log.trace("transient fast creation context deleted");
|
|
879
916
|
});
|
|
880
917
|
navigation = creationRowContext.delete("$direct");
|
|
881
|
-
return await this.postDocumentCreation(Promise.
|
|
918
|
+
return await this.postDocumentCreation(Promise.allSettled([creation, navigation]), listBinding);
|
|
882
919
|
} catch (error: unknown) {
|
|
883
920
|
// Reset busy indicator after a validation error
|
|
884
921
|
if (BusyLocker.isLocked(this.base.getView().getModel("ui"))) {
|
|
@@ -898,6 +935,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
898
935
|
* @param parameters.parentContext Parent context (for TreeTable)
|
|
899
936
|
* @param parameters.data Intial data for creation
|
|
900
937
|
* @param parameters.creationDialogFields Fields to be displayed in the creation dialog
|
|
938
|
+
* @param parameters.requestAtLeast Defines the list of properties that should be requested when creating the new document to avoid additional requests later on.
|
|
901
939
|
* @param listBinding ODataListBinding where the document is created
|
|
902
940
|
* @returns Promise resolves once the document has been created
|
|
903
941
|
*/
|
|
@@ -910,6 +948,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
910
948
|
parentContext?: ODataV4Context;
|
|
911
949
|
data?: object;
|
|
912
950
|
creationDialogFields?: string[];
|
|
951
|
+
requestAtLeast?: string[];
|
|
913
952
|
},
|
|
914
953
|
listBinding: ODataListBinding
|
|
915
954
|
): Promise<void> {
|
|
@@ -965,7 +1004,8 @@ class EditFlow extends BaseControllerExtension {
|
|
|
965
1004
|
creationMode: parameters.creationMode,
|
|
966
1005
|
parentContext: parameters.parentContext,
|
|
967
1006
|
data: parameters.data as Record<string, unknown>,
|
|
968
|
-
creationDialogFields: parameters.creationDialogFields
|
|
1007
|
+
creationDialogFields: parameters.creationDialogFields,
|
|
1008
|
+
requestAtLeast: parameters.requestAtLeast
|
|
969
1009
|
},
|
|
970
1010
|
this.getAppComponent(),
|
|
971
1011
|
this._getResourceModel(),
|
|
@@ -976,7 +1016,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
976
1016
|
if (!parameters.skipSideEffects) {
|
|
977
1017
|
this.handleSideEffects(listBinding, creation);
|
|
978
1018
|
}
|
|
979
|
-
return this.postDocumentCreation(Promise.
|
|
1019
|
+
return this.postDocumentCreation(Promise.allSettled([creation, this.syncTask(creation)]), listBinding);
|
|
980
1020
|
}
|
|
981
1021
|
|
|
982
1022
|
/**
|
|
@@ -1093,16 +1133,27 @@ class EditFlow extends BaseControllerExtension {
|
|
|
1093
1133
|
|
|
1094
1134
|
/**
|
|
1095
1135
|
* Creates a deferred document.
|
|
1136
|
+
* @param parameters Contains the following attributes:
|
|
1137
|
+
* @param parameters.data Data to save on the new document
|
|
1138
|
+
* @param parameters.parentContext
|
|
1139
|
+
* @param parameters.requestAtLeast Defines the list of properties that should be requested when creating the new document to avoid additional requests later on.
|
|
1096
1140
|
* @param listBinding ODataListBinding where the document has to be created
|
|
1097
|
-
* @param parentContext Optional parent context when creating a node in TreeTable
|
|
1098
|
-
* @param data
|
|
1099
1141
|
* @returns Promise resolves once the navigation is done
|
|
1100
1142
|
*/
|
|
1101
|
-
async createDeferredDocument(
|
|
1143
|
+
async createDeferredDocument(
|
|
1144
|
+
parameters: { data?: object; parentContext?: ODataV4Context; requestAtLeast?: string[] },
|
|
1145
|
+
listBinding: ODataListBinding
|
|
1146
|
+
): Promise<void> {
|
|
1102
1147
|
const lockObject = this.getGlobalUIModel();
|
|
1103
1148
|
BusyLocker.lock(lockObject);
|
|
1104
1149
|
await this.getInternalRouting().navigateForwardToContext(listBinding, {
|
|
1105
|
-
createOnNavigateParameters: {
|
|
1150
|
+
createOnNavigateParameters: {
|
|
1151
|
+
mode: "Deferred",
|
|
1152
|
+
parentContext: parameters.parentContext,
|
|
1153
|
+
listBinding,
|
|
1154
|
+
data: parameters.data,
|
|
1155
|
+
requestAtLeast: parameters.requestAtLeast
|
|
1156
|
+
},
|
|
1106
1157
|
editable: true,
|
|
1107
1158
|
forceFocus: true
|
|
1108
1159
|
});
|
|
@@ -1118,6 +1169,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
1118
1169
|
* @param parameters.data Data to save on the new document
|
|
1119
1170
|
* @param parameters.skipSideEffects The sideEffects are requested
|
|
1120
1171
|
* @param parameters.parentContext
|
|
1172
|
+
* @param parameters.requestAtLeast Defines the list of properties that should be requested when creating the new document to avoid additional requests later on.
|
|
1121
1173
|
* @param listBinding ODataListBinding where the document is created
|
|
1122
1174
|
* @returns Promise resolves once the document has been created
|
|
1123
1175
|
*/
|
|
@@ -1129,6 +1181,7 @@ class EditFlow extends BaseControllerExtension {
|
|
|
1129
1181
|
data?: Record<string, unknown>;
|
|
1130
1182
|
skipSideEffects?: boolean;
|
|
1131
1183
|
parentContext?: ODataV4Context;
|
|
1184
|
+
requestAtLeast?: string[];
|
|
1132
1185
|
},
|
|
1133
1186
|
listBinding: ODataListBinding
|
|
1134
1187
|
): Promise<void> {
|
|
@@ -1145,7 +1198,8 @@ class EditFlow extends BaseControllerExtension {
|
|
|
1145
1198
|
...{
|
|
1146
1199
|
parentControl: this.getView(),
|
|
1147
1200
|
beforeCreateCallBack: this.base.editFlow.onBeforeCreate,
|
|
1148
|
-
skipParameterDialog: this.getAppComponent().getStartupMode() === StartupMode.AutoCreate // In case the application was called with preferredMode=autoCreateWith, we want to skip the action parameter dialog
|
|
1201
|
+
skipParameterDialog: this.getAppComponent().getStartupMode() === StartupMode.AutoCreate, // In case the application was called with preferredMode=autoCreateWith, we want to skip the action parameter dialog
|
|
1202
|
+
requestAtLeast: this._isFclEnabled() ? parameters.requestAtLeast : undefined // For fullscreen, we don't need to request extra properties as the table will be refreshed when navigating back with the DirtyState
|
|
1149
1203
|
}
|
|
1150
1204
|
},
|
|
1151
1205
|
this.getAppComponent(),
|
|
@@ -1176,31 +1230,47 @@ class EditFlow extends BaseControllerExtension {
|
|
|
1176
1230
|
forceFocus: true
|
|
1177
1231
|
});
|
|
1178
1232
|
} else {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1233
|
+
const coreResourceBundle = Library.getResourceBundleFor("sap.fe.core")!;
|
|
1234
|
+
navigation = creation
|
|
1235
|
+
.then(async (newDocumentContext) => {
|
|
1236
|
+
if (!newDocumentContext) {
|
|
1237
|
+
return routingListener.navigateToMessagePage(coreResourceBundle.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"), {
|
|
1238
|
+
title: coreResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
|
|
1239
|
+
description: coreResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")
|
|
1240
|
+
});
|
|
1241
|
+
} else {
|
|
1242
|
+
// In case the Sync creation was triggered for a deferred creation, we don't navigate forward
|
|
1243
|
+
// as we're already on the corresponding ObjectPage
|
|
1244
|
+
const navParameters: RoutingNavigationParameters = {
|
|
1245
|
+
editable: true,
|
|
1246
|
+
forceFocus: true,
|
|
1247
|
+
transient:
|
|
1248
|
+
this.getProgrammingModel(listBinding) == ProgrammingModel.Sticky || parameters.createAction
|
|
1249
|
+
? true
|
|
1250
|
+
: undefined
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
return parameters.bFromDeferred
|
|
1254
|
+
? routingListener.navigateToContext(newDocumentContext, navParameters)
|
|
1255
|
+
: routingListener.navigateForwardToContext(newDocumentContext, navParameters);
|
|
1256
|
+
}
|
|
1257
|
+
})
|
|
1258
|
+
.catch(async (error: unknown) => {
|
|
1259
|
+
if (typeof error === "string" && error === Constants.CancelActionDialog) {
|
|
1260
|
+
// Creation has been cancelled by the user => no error message page
|
|
1261
|
+
throw error;
|
|
1262
|
+
}
|
|
1263
|
+
Log.error("Creation error: ", error as string);
|
|
1264
|
+
// Navigate to error message page in case of an error during creation or navigation
|
|
1182
1265
|
return routingListener.navigateToMessagePage(coreResourceBundle.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"), {
|
|
1183
1266
|
title: coreResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
|
|
1184
|
-
description: coreResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")
|
|
1267
|
+
description: coreResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION"),
|
|
1268
|
+
showMessagePageOnCreateFailure: true
|
|
1185
1269
|
});
|
|
1186
|
-
}
|
|
1187
|
-
// In case the Sync creation was triggered for a deferred creation, we don't navigate forward
|
|
1188
|
-
// as we're already on the corresponding ObjectPage
|
|
1189
|
-
const navParameters: RoutingNavigationParameters = {
|
|
1190
|
-
editable: true,
|
|
1191
|
-
forceFocus: true,
|
|
1192
|
-
transient:
|
|
1193
|
-
this.getProgrammingModel(listBinding) == ProgrammingModel.Sticky || parameters.createAction ? true : undefined
|
|
1194
|
-
};
|
|
1195
|
-
|
|
1196
|
-
return parameters.bFromDeferred
|
|
1197
|
-
? routingListener.navigateToContext(newDocumentContext, navParameters)
|
|
1198
|
-
: routingListener.navigateForwardToContext(newDocumentContext, navParameters);
|
|
1199
|
-
}
|
|
1200
|
-
});
|
|
1270
|
+
});
|
|
1201
1271
|
}
|
|
1202
1272
|
try {
|
|
1203
|
-
await this.postDocumentCreation(Promise.
|
|
1273
|
+
await this.postDocumentCreation(Promise.allSettled([creation, navigation]), listBinding);
|
|
1204
1274
|
} catch (error: unknown) {
|
|
1205
1275
|
// TODO: currently, the only errors handled here are raised as string - should be changed to Error objects
|
|
1206
1276
|
// creation has been cancelled by user or failed in backend => in case we have navigated to transient context before, navigate back
|