@magic-xpa/engine 4.1200.0-dev4120.157 → 4.1200.0-dev4120.159
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.
@@ -12485,7 +12485,7 @@ class Operation {
|
|
12485
12485
|
/// </param>
|
12486
12486
|
/// <param name = "returnedFromServer">true if the server returned the execution to this operation</param>
|
12487
12487
|
/// <returns> boolean for verify and block operations</returns>
|
12488
|
-
async execute(returnedFromServer) {
|
12488
|
+
async execute(returnedFromServer, desiredRouteName = null) {
|
12489
12489
|
let lastRtEvent = AccessHelper.eventsManager.getLastRtEvent();
|
12490
12490
|
let mprgCreator = null;
|
12491
12491
|
let flowMonitor = FlowMonitorQueue.Instance;
|
@@ -12530,8 +12530,17 @@ class Operation {
|
|
12530
12530
|
await this.operServer(mprgCreator);
|
12531
12531
|
break;
|
12532
12532
|
case ConstInterface.MG_OPER_CALL:
|
12533
|
-
if (this._subformExp != null)
|
12534
|
-
|
12533
|
+
if (this._subformExp != null) {
|
12534
|
+
const subformName = await this._subformExp.evaluateWithResultTypeAndLength(StorageAttribute.ALPHA, 30);
|
12535
|
+
if (!subformName || subformName.length > 30) {
|
12536
|
+
const messageKey = !subformName ? MsgInterface.STR_ERR_BLANK_SUBFORM_NAME : MsgInterface.STR_ERR_SUBFORM_NAME_EXCEEDS_LIMIT;
|
12537
|
+
let message = LanguageData.Instance.getConstMessage(messageKey);
|
12538
|
+
message = LanguageData.Instance.translate(message);
|
12539
|
+
this._task.WriteToMessagePane(message);
|
12540
|
+
return false;
|
12541
|
+
}
|
12542
|
+
this._subformCtrlName = subformName;
|
12543
|
+
}
|
12535
12544
|
if (this._publicName != null) {
|
12536
12545
|
this.operCallParallel();
|
12537
12546
|
}
|
@@ -12561,8 +12570,14 @@ class Operation {
|
|
12561
12570
|
let canRoute = false;
|
12562
12571
|
let rtEvnt = AccessHelper.eventsManager.getLastRtEvent();
|
12563
12572
|
if (rtEvnt !== null) {
|
12564
|
-
|
12565
|
-
if (
|
12573
|
+
// If we are here for default route path, set the routeParams as null because those are relevant only for the original route.
|
12574
|
+
if (desiredRouteName == null) {
|
12575
|
+
desiredRouteName = (await rtEvnt.getArgList().getArg(0).getValue(StorageAttribute.ALPHA, 0)).trim();
|
12576
|
+
this._routeParams = rtEvnt.getRouteParamList();
|
12577
|
+
}
|
12578
|
+
else
|
12579
|
+
this._routeParams = null;
|
12580
|
+
if (desiredRouteName === this._routerPath &&
|
12566
12581
|
((rtEvnt.getArgList().getArg(1).skipArg() && destSubForm === this._task.getForm().DefaultRouterOutlet) ||
|
12567
12582
|
(!rtEvnt.getArgList().getArg(1).skipArg() && (await rtEvnt.getArgList().getArg(1).getValue(StorageAttribute.ALPHA, 0)).trim() === this._originalRouterOutletName)))
|
12568
12583
|
canRoute = true;
|
@@ -28044,6 +28059,7 @@ class EventHandler {
|
|
28044
28059
|
_scope = null; // Task|Subtask|Global
|
28045
28060
|
_task = null;
|
28046
28061
|
_taskMgdID = -1;
|
28062
|
+
_defRouteName = null;
|
28047
28063
|
/// <summary>
|
28048
28064
|
/// CTOR
|
28049
28065
|
/// </summary>
|
@@ -28172,6 +28188,9 @@ class EventHandler {
|
|
28172
28188
|
case ConstInterface.MG_ATTR_HANDLER_ONFORM:
|
28173
28189
|
this._isHandlerOnForm = XmlParser.getBoolean(valueStr);
|
28174
28190
|
break;
|
28191
|
+
case XMLConstants.MG_ATTR_DEF_ROUTER_NAME:
|
28192
|
+
this._defRouteName = XmlParser.unescape(valueStr);
|
28193
|
+
break;
|
28175
28194
|
default:
|
28176
28195
|
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventHandler class. Insert case to EventHandler.initElements for " + attribute);
|
28177
28196
|
break;
|
@@ -28400,8 +28419,13 @@ class EventHandler {
|
|
28400
28419
|
await this.resetLocalVariables(args);
|
28401
28420
|
initialLoopStackSize = this._task.getLoopStackSize();
|
28402
28421
|
let retVals = null;
|
28403
|
-
if (this._operationTab.getSize() > 0)
|
28422
|
+
if (this._operationTab.getSize() > 0) {
|
28404
28423
|
retVals = await this.executeOperations(0, this._operationTab.getSize() - 1, taskEnd, mgdID, depth, isChangedCurrWndRef, false, false, -1);
|
28424
|
+
if (retVals == null && this.isRouteHandler() && this.getDefaultRouteName() != null) {
|
28425
|
+
// call again with an additional param Default Route Name
|
28426
|
+
retVals = await this.executeOperations(0, this._operationTab.getSize() - 1, taskEnd, mgdID, depth, isChangedCurrWndRef, false, false, -1, this.getDefaultRouteName());
|
28427
|
+
}
|
28428
|
+
}
|
28405
28429
|
isChangedCurrWnd = isChangedCurrWndRef.value;
|
28406
28430
|
if (retVals !== null)
|
28407
28431
|
return retVals;
|
@@ -28484,7 +28508,7 @@ class EventHandler {
|
|
28484
28508
|
/// <summary>
|
28485
28509
|
/// execute the operations starting from fromIdx and ending at endIdx.
|
28486
28510
|
/// </summary>
|
28487
|
-
async executeOperations(fromIdx, toIdx, taskEnd, mgdID, depth, isChangedCurrWndRef, inBlockIf, inReturnedFromServer, inNextOperIdx) {
|
28511
|
+
async executeOperations(fromIdx, toIdx, taskEnd, mgdID, depth, isChangedCurrWndRef, inBlockIf, inReturnedFromServer, inNextOperIdx, desiredRouteName = null) {
|
28488
28512
|
let oper;
|
28489
28513
|
let operType;
|
28490
28514
|
let nextOperIdx = -1;
|
@@ -28665,7 +28689,7 @@ class EventHandler {
|
|
28665
28689
|
case ConstInterface.MG_OPER_CALL:
|
28666
28690
|
this._task.setUseLoopStack(depth > 0);
|
28667
28691
|
// if false is returned, it means that a route operation was executed.
|
28668
|
-
routeOperationExecuted = await oper.execute(returnedFromServer);
|
28692
|
+
routeOperationExecuted = await oper.execute(returnedFromServer, desiredRouteName);
|
28669
28693
|
break;
|
28670
28694
|
default:
|
28671
28695
|
// the rest of the operations (those that do not affect the flow)
|
@@ -28820,6 +28844,12 @@ class EventHandler {
|
|
28820
28844
|
getEvent() {
|
28821
28845
|
return this._evt;
|
28822
28846
|
}
|
28847
|
+
isRouteHandler() {
|
28848
|
+
return (this._evt.getType() == ConstInterface.EVENT_TYPE_INTERNAL && this._evt.getInternalCode() === InternalInterface.MG_ACT_WEBCLIENT_ROUTE);
|
28849
|
+
}
|
28850
|
+
getDefaultRouteName() {
|
28851
|
+
return this._defRouteName;
|
28852
|
+
}
|
28823
28853
|
/// <summary>
|
28824
28854
|
/// get the Id of the event handler
|
28825
28855
|
/// </summary>
|
@@ -39514,7 +39544,7 @@ class CommandsTable {
|
|
39514
39544
|
}
|
39515
39545
|
}
|
39516
39546
|
|
39517
|
-
let CurrentClientVersion = '4.1200.0-dev4120.
|
39547
|
+
let CurrentClientVersion = '4.1200.0-dev4120.159';
|
39518
39548
|
|
39519
39549
|
// @dynamic
|
39520
39550
|
class ClientManager {
|