@magic-xpa/engine 4.1200.0-ec.131.0 → 4.1201.0-dev000.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/README.md +7 -7
- package/fesm2022/magic-xpa-engine.mjs +146 -11
- package/fesm2022/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/ConstInterface.d.ts +1 -0
- package/src/commands/ClientToServer/CommandFactory.d.ts +2 -2
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +1 -0
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +1 -0
- package/src/event/EventHandler.d.ts +5 -0
- package/src/exp/ExpressionEvaluator.d.ts +5 -0
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +1 -0
- package/src/rt/Operation.d.ts +3 -1
- package/src/tasks/Task.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Magic-xpa/engine
|
|
2
|
-
|
|
3
|
-
This package is part of Magic xpa Web Application Framework.
|
|
4
|
-
It is used to easily create modern business apps powered by Angular to provide a rich user experience and meet the increasingly complex enterprise business expectations for digital transformation.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
# Magic-xpa/engine
|
|
2
|
+
|
|
3
|
+
This package is part of Magic xpa Web Application Framework.
|
|
4
|
+
It is used to easily create modern business apps powered by Angular to provide a rich user experience and meet the increasingly complex enterprise business expectations for digital transformation.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
@@ -3,6 +3,7 @@ import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Log
|
|
|
3
3
|
import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, VectorType, PIC, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, GuiExpressionEvaluator, ExpressionInterface, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
|
|
4
4
|
import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
5
5
|
import { timer, Subject } from 'rxjs';
|
|
6
|
+
import * as CryptoJS from 'crypto-js';
|
|
6
7
|
|
|
7
8
|
///
|
|
8
9
|
/// This class is used to hold references to global objects, using their interfaces/base classes. This allows other objects to access those global objects
|
|
@@ -315,6 +316,7 @@ class ConstInterface {
|
|
|
315
316
|
static MG_ATTR_HANDLER_ONFORM = "HandlerOnForm";
|
|
316
317
|
static MG_ATTR_DROP_USERFORMATS = "dropuserformats";
|
|
317
318
|
static MG_ATTR_CONTROL_NAME = "ControlName";
|
|
319
|
+
static MG_ATTR_SEARCH_STR = "searchStr";
|
|
318
320
|
static MG_TAG_HIDDEN_CONTOLS = "HiddenControls";
|
|
319
321
|
static MG_ATTR_ISNS = "Isns";
|
|
320
322
|
static MG_ATTR_SPECIAL_CANCEL_ON_CREATE = "SpecialCancelOnCreate";
|
|
@@ -7494,6 +7496,9 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
7494
7496
|
queryParams += `&${ConstInterface.RC_TOKEN_SESSION_ID}=${sessionId}`;
|
|
7495
7497
|
}
|
|
7496
7498
|
queryParams += `&${ConstInterface.RC_TOKEN_SESSION_COUNT}${sessionCounter}`;
|
|
7499
|
+
queryParams += `&${ConstInterface.RC_INDICATION}`;
|
|
7500
|
+
// To remove the trailing '&' character (added by RC_INDICATION) from the end of the query string
|
|
7501
|
+
queryParams = queryParams.substring(0, queryParams.length - 1);
|
|
7497
7502
|
// Insert query parameters in the query string
|
|
7498
7503
|
modifiedQuery = u.search.substring(0, ctxIdIdx + CTX_ID_PLACEHOLDER.length - 1) + queryParams + u.search.substring(ctxIdIdx + CTX_ID_PLACEHOLDER.length - 1);
|
|
7499
7504
|
// modifiedQuery is updated with file name with base64 encoded.
|
|
@@ -9735,6 +9740,17 @@ class ExpressionDict {
|
|
|
9735
9740
|
new ExpDesc('B', 0, 1, 1, 'A', false), /* 703- Delete_Cookie */
|
|
9736
9741
|
null,
|
|
9737
9742
|
new ExpDesc('U', 0, 0, 0, '', false), /* 705- RouteGet */
|
|
9743
|
+
null,
|
|
9744
|
+
null,
|
|
9745
|
+
null,
|
|
9746
|
+
null,
|
|
9747
|
+
null,
|
|
9748
|
+
null,
|
|
9749
|
+
null,
|
|
9750
|
+
null,
|
|
9751
|
+
null,
|
|
9752
|
+
null,
|
|
9753
|
+
new ExpDesc('NO', 0, 2, 2, 'A', false), /* 716- Hash */
|
|
9738
9754
|
];
|
|
9739
9755
|
}
|
|
9740
9756
|
|
|
@@ -10101,6 +10117,7 @@ class RefreshEventCommand extends EventCommand {
|
|
|
10101
10117
|
/// </summary>
|
|
10102
10118
|
class FetchDataControlValuesEventCommand extends EventCommand {
|
|
10103
10119
|
ControlName = null;
|
|
10120
|
+
FilterData = null;
|
|
10104
10121
|
constructor() {
|
|
10105
10122
|
super(InternalInterface.MG_ACT_FETCH_DATA_CONTROL_VALUES);
|
|
10106
10123
|
}
|
|
@@ -10109,6 +10126,8 @@ class FetchDataControlValuesEventCommand extends EventCommand {
|
|
|
10109
10126
|
helper.SerializeTaskTag(this.TaskTag);
|
|
10110
10127
|
helper.SerializeMagicEvent(this.MagicEvent);
|
|
10111
10128
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_CONTROL_NAME, this.ControlName);
|
|
10129
|
+
if (this.FilterData != null && this.FilterData != "")
|
|
10130
|
+
helper.SerializeAttribute(ConstInterface.MG_ATTR_SEARCH_STR, this.FilterData);
|
|
10112
10131
|
return helper.GetString();
|
|
10113
10132
|
}
|
|
10114
10133
|
getCommandInfo() {
|
|
@@ -10557,6 +10576,7 @@ class SelectProgramCommand extends ExecOperCommand {
|
|
|
10557
10576
|
/// </summary>
|
|
10558
10577
|
class ControlItemsRefreshCommand extends DataviewCommand {
|
|
10559
10578
|
Control = null;
|
|
10579
|
+
FilterData = null;
|
|
10560
10580
|
constructor() {
|
|
10561
10581
|
super();
|
|
10562
10582
|
}
|
|
@@ -10627,11 +10647,12 @@ class CommandFactory {
|
|
|
10627
10647
|
/// <param name="taskId"></param>
|
|
10628
10648
|
/// <param name="control"></param>
|
|
10629
10649
|
/// <returns></returns>
|
|
10630
|
-
static CreateControlItemsRefreshCommand(taskId, control) {
|
|
10650
|
+
static CreateControlItemsRefreshCommand(taskId, control, filterData) {
|
|
10631
10651
|
let command = new ControlItemsRefreshCommand();
|
|
10632
10652
|
command.CommandType = DataViewCommandType.ControlItemsRefresh;
|
|
10633
10653
|
command.TaskTag = taskId;
|
|
10634
10654
|
command.Control = control;
|
|
10655
|
+
command.FilterData = filterData;
|
|
10635
10656
|
return command;
|
|
10636
10657
|
}
|
|
10637
10658
|
/// <summary>
|
|
@@ -10736,10 +10757,11 @@ class CommandFactory {
|
|
|
10736
10757
|
/// <param name="controlName"></param>
|
|
10737
10758
|
/// <param name="generationParam"></param>
|
|
10738
10759
|
/// <returns></returns>
|
|
10739
|
-
static CreatecFetchDataControlValuesCommand(taskTag, controlName) {
|
|
10760
|
+
static CreatecFetchDataControlValuesCommand(taskTag, controlName, filterData) {
|
|
10740
10761
|
let fetchDataControlValuesEventCommand = new FetchDataControlValuesEventCommand();
|
|
10741
10762
|
fetchDataControlValuesEventCommand.TaskTag = taskTag;
|
|
10742
10763
|
fetchDataControlValuesEventCommand.ControlName = controlName;
|
|
10764
|
+
fetchDataControlValuesEventCommand.FilterData = filterData;
|
|
10743
10765
|
return fetchDataControlValuesEventCommand;
|
|
10744
10766
|
}
|
|
10745
10767
|
static CreateSubformRefreshCommand(taskTag, subformTaskTag, explicitSubformRefresh) {
|
|
@@ -12215,6 +12237,7 @@ class Operation {
|
|
|
12215
12237
|
_undo = true;
|
|
12216
12238
|
_isRoute = false;
|
|
12217
12239
|
_routerPath = null;
|
|
12240
|
+
_subformExp = null;
|
|
12218
12241
|
_originalRouterOutletName = null;
|
|
12219
12242
|
_routeParams = null;
|
|
12220
12243
|
constructor() {
|
|
@@ -12418,6 +12441,10 @@ class Operation {
|
|
|
12418
12441
|
case XMLConstants.MG_ATTR_ROUTER_PATH:
|
|
12419
12442
|
this._routerPath = XmlParser.unescape(valueStr);
|
|
12420
12443
|
break;
|
|
12444
|
+
case XMLConstants.MG_ATTR_SUBFORM_EXP:
|
|
12445
|
+
expId = XmlParser.getInt(valueStr);
|
|
12446
|
+
this._subformExp = taskRef.getExpById(expId);
|
|
12447
|
+
break;
|
|
12421
12448
|
default:
|
|
12422
12449
|
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Operation class. Insert case to Operation.initElements for " + attribute);
|
|
12423
12450
|
break;
|
|
@@ -12480,7 +12507,7 @@ class Operation {
|
|
|
12480
12507
|
/// </param>
|
|
12481
12508
|
/// <param name = "returnedFromServer">true if the server returned the execution to this operation</param>
|
|
12482
12509
|
/// <returns> boolean for verify and block operations</returns>
|
|
12483
|
-
async execute(returnedFromServer) {
|
|
12510
|
+
async execute(returnedFromServer, desiredRouteName = null) {
|
|
12484
12511
|
let lastRtEvent = AccessHelper.eventsManager.getLastRtEvent();
|
|
12485
12512
|
let mprgCreator = null;
|
|
12486
12513
|
let flowMonitor = FlowMonitorQueue.Instance;
|
|
@@ -12525,6 +12552,17 @@ class Operation {
|
|
|
12525
12552
|
await this.operServer(mprgCreator);
|
|
12526
12553
|
break;
|
|
12527
12554
|
case ConstInterface.MG_OPER_CALL:
|
|
12555
|
+
if (this._subformExp != null) {
|
|
12556
|
+
const subformName = await this._subformExp.evaluateWithResultTypeAndLength(StorageAttribute.ALPHA, 30);
|
|
12557
|
+
if (!subformName || subformName.length > 30) {
|
|
12558
|
+
const messageKey = !subformName ? MsgInterface.STR_ERR_BLANK_SUBFORM_NAME : MsgInterface.STR_ERR_SUBFORM_NAME_EXCEEDS_LIMIT;
|
|
12559
|
+
let message = LanguageData.Instance.getConstMessage(messageKey);
|
|
12560
|
+
message = LanguageData.Instance.translate(message);
|
|
12561
|
+
this._task.WriteToMessagePane(message);
|
|
12562
|
+
return false;
|
|
12563
|
+
}
|
|
12564
|
+
this._subformCtrlName = subformName;
|
|
12565
|
+
}
|
|
12528
12566
|
if (this._publicName != null) {
|
|
12529
12567
|
this.operCallParallel();
|
|
12530
12568
|
}
|
|
@@ -12554,8 +12592,16 @@ class Operation {
|
|
|
12554
12592
|
let canRoute = false;
|
|
12555
12593
|
let rtEvnt = AccessHelper.eventsManager.getLastRtEvent();
|
|
12556
12594
|
if (rtEvnt !== null) {
|
|
12557
|
-
|
|
12558
|
-
if (
|
|
12595
|
+
// If we are here for default route path, set the routeParams as null because those are relevant only for the original route.
|
|
12596
|
+
if (!this._evtHandler.isExecutingDefaultRoute()) {
|
|
12597
|
+
desiredRouteName = (await rtEvnt.getArgList().getArg(0).getValue(StorageAttribute.ALPHA, 0)).trim();
|
|
12598
|
+
this._routeParams = rtEvnt.getRouteParamList();
|
|
12599
|
+
}
|
|
12600
|
+
else {
|
|
12601
|
+
desiredRouteName = this._evtHandler.getDefaultRouteName();
|
|
12602
|
+
this._routeParams = null;
|
|
12603
|
+
}
|
|
12604
|
+
if (desiredRouteName === this._routerPath &&
|
|
12559
12605
|
((rtEvnt.getArgList().getArg(1).skipArg() && destSubForm === this._task.getForm().DefaultRouterOutlet) ||
|
|
12560
12606
|
(!rtEvnt.getArgList().getArg(1).skipArg() && (await rtEvnt.getArgList().getArg(1).getValue(StorageAttribute.ALPHA, 0)).trim() === this._originalRouterOutletName)))
|
|
12561
12607
|
canRoute = true;
|
|
@@ -13063,7 +13109,18 @@ class Operation {
|
|
|
13063
13109
|
/// </summary>
|
|
13064
13110
|
/// <returns></returns>
|
|
13065
13111
|
async canExecute() {
|
|
13066
|
-
return await this.getCondVal();
|
|
13112
|
+
return (this.isOperationAllowedWhileExecutingDefaultRoute() && await this.getCondVal());
|
|
13113
|
+
}
|
|
13114
|
+
isOperationAllowedWhileExecutingDefaultRoute() {
|
|
13115
|
+
let isAllowed = true;
|
|
13116
|
+
if (this._evtHandler.isExecutingDefaultRoute()) {
|
|
13117
|
+
if (this._type == ConstInterface.MG_OPER_BLOCK || this._type == ConstInterface.MG_OPER_ELSE ||
|
|
13118
|
+
(this._type == ConstInterface.MG_OPER_CALL && this._isRoute))
|
|
13119
|
+
return true;
|
|
13120
|
+
else
|
|
13121
|
+
return false;
|
|
13122
|
+
}
|
|
13123
|
+
return isAllowed;
|
|
13067
13124
|
}
|
|
13068
13125
|
/// <summary>
|
|
13069
13126
|
/// </summary>
|
|
@@ -13775,6 +13832,9 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13775
13832
|
static PARENT_LEN = 2; // 2 bytes
|
|
13776
13833
|
static SHORT_OBJECT_LEN = 2; // 2 bytes
|
|
13777
13834
|
static LONG_OBJECT_LEN = 4; // 4 bytes
|
|
13835
|
+
static MD5_ALGO_NUM = 1;
|
|
13836
|
+
static SHA1_ALGO_NUM = 2;
|
|
13837
|
+
static SHA2_ALGO_NUM = 3;
|
|
13778
13838
|
static _recursiveExpCalcCount = 0;
|
|
13779
13839
|
_charsToTrim = [' ', '\0'];
|
|
13780
13840
|
_expressionLocalJpn = null;
|
|
@@ -15398,6 +15458,12 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
15398
15458
|
case ExpressionInterface.EXP_OP_ROUTEGET:
|
|
15399
15459
|
this.eval_op_route_get(resVal);
|
|
15400
15460
|
break;
|
|
15461
|
+
case ExpressionInterface.EXP_OP_HASH:
|
|
15462
|
+
val2 = valStack.pop();
|
|
15463
|
+
val1 = valStack.pop();
|
|
15464
|
+
this.eval_op_Hash(val1, val2, resVal);
|
|
15465
|
+
expStrTracker.resetNullResult();
|
|
15466
|
+
break;
|
|
15401
15467
|
default:
|
|
15402
15468
|
return;
|
|
15403
15469
|
}
|
|
@@ -16849,7 +16915,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
16849
16915
|
let control = tsk.getForm().GetCtrl(val1.StrVal);
|
|
16850
16916
|
//This function is applicable only for Combo box, List box etc. i.e. for choice controls. Also it will refresh items only if Source table is attached to the data control.
|
|
16851
16917
|
if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
|
|
16852
|
-
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
|
|
16918
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control, "");
|
|
16853
16919
|
await tsk.DataviewManager.CurrentDataviewManager.Execute(command);
|
|
16854
16920
|
success = true;
|
|
16855
16921
|
}
|
|
@@ -18364,7 +18430,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
18364
18430
|
if (!isNullOrUndefined(args)) {
|
|
18365
18431
|
// TODO: This is a patch fix put for MXPA-30360. Problem is that the lazy loading components are not loaded in an async way.
|
|
18366
18432
|
// Hence for the first record cycle the CallJS operation was not working. So, async loading of lazy loaded comps should be
|
|
18367
|
-
// handled.
|
|
18433
|
+
// handled.
|
|
18368
18434
|
resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
|
|
18369
18435
|
resVal.Attr = StorageAttribute.ALPHA;
|
|
18370
18436
|
}
|
|
@@ -18461,6 +18527,35 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
18461
18527
|
}
|
|
18462
18528
|
return attr;
|
|
18463
18529
|
}
|
|
18530
|
+
eval_op_Hash(val1, val2, resVal) {
|
|
18531
|
+
resVal.Attr = StorageAttribute.ALPHA;
|
|
18532
|
+
resVal.StrVal = '';
|
|
18533
|
+
if (val1.IsNull || val2.IsNull)
|
|
18534
|
+
return;
|
|
18535
|
+
let str = '';
|
|
18536
|
+
const byteArray = BlobType.getBytes(val2.StrVal);
|
|
18537
|
+
const wordArray = this.toWordArray(byteArray);
|
|
18538
|
+
if (val1.MgNumVal.NUM_2_LONG() === ExpressionEvaluator.MD5_ALGO_NUM)
|
|
18539
|
+
str = CryptoJS.MD5(wordArray).toString();
|
|
18540
|
+
else if (val1.MgNumVal.NUM_2_LONG() === ExpressionEvaluator.SHA1_ALGO_NUM)
|
|
18541
|
+
str = CryptoJS.SHA1(wordArray).toString();
|
|
18542
|
+
else if (val1.MgNumVal.NUM_2_LONG() === ExpressionEvaluator.SHA2_ALGO_NUM)
|
|
18543
|
+
str = CryptoJS.SHA256(wordArray).toString();
|
|
18544
|
+
else
|
|
18545
|
+
Logger.Instance.WriteErrorToLog(LanguageData.Instance.getConstMessage(MsgInterface.STR_ERR_INVALID_HASH_ALGO_NUMBER));
|
|
18546
|
+
resVal.StrVal = str;
|
|
18547
|
+
}
|
|
18548
|
+
// Convert Uint8Array to WordArray
|
|
18549
|
+
toWordArray(u8) {
|
|
18550
|
+
const words = [];
|
|
18551
|
+
for (let i = 0; i < u8.length; i += 4) {
|
|
18552
|
+
words.push(((u8[i] || 0) << 24) |
|
|
18553
|
+
((u8[i + 1] || 0) << 16) |
|
|
18554
|
+
((u8[i + 2] || 0) << 8) |
|
|
18555
|
+
(u8[i + 3] || 0));
|
|
18556
|
+
}
|
|
18557
|
+
return CryptoJS.lib.WordArray.create(words, u8.length);
|
|
18558
|
+
}
|
|
18464
18559
|
}
|
|
18465
18560
|
/// <summary>
|
|
18466
18561
|
/// This exception used when at least one of the operands is null
|
|
@@ -22891,6 +22986,9 @@ class DataView extends DataViewBase {
|
|
|
22891
22986
|
break;
|
|
22892
22987
|
case XMLConstants.MG_ATTR_TASKID:
|
|
22893
22988
|
continue;
|
|
22989
|
+
case XMLConstants.MG_MAINPRG_CTL_PATH:
|
|
22990
|
+
this._task.MainPrgCtlPath = valueStr;
|
|
22991
|
+
break;
|
|
22894
22992
|
case ConstInterface.MG_ATTR_LOW_ID:
|
|
22895
22993
|
this._lastCreatedRecId = NNumber.Parse(valueStr);
|
|
22896
22994
|
break;
|
|
@@ -25147,13 +25245,15 @@ class ResultValue {
|
|
|
25147
25245
|
|
|
25148
25246
|
class RemoteControlItemsRefreshCommand extends RemoteDataViewCommandBase {
|
|
25149
25247
|
control = null;
|
|
25248
|
+
filterData = null;
|
|
25150
25249
|
constructor(command) {
|
|
25151
25250
|
super(command);
|
|
25152
25251
|
this.control = command.Control;
|
|
25252
|
+
this.filterData = command.FilterData;
|
|
25153
25253
|
}
|
|
25154
25254
|
async Execute() {
|
|
25155
25255
|
let res = new ResultValue();
|
|
25156
|
-
let cmd = CommandFactory.CreatecFetchDataControlValuesCommand(this.Task.getTaskTag(), this.control.getName());
|
|
25256
|
+
let cmd = CommandFactory.CreatecFetchDataControlValuesCommand(this.Task.getTaskTag(), this.control.getName(), this.filterData);
|
|
25157
25257
|
this.Task.getMGData().CmdsToServer.Add(cmd);
|
|
25158
25258
|
// Fetch data control values from server.
|
|
25159
25259
|
await RemoteCommandsProcessor.GetInstance().Execute_1(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS, CommandsProcessorBase_SessionStage.NORMAL, res);
|
|
@@ -28037,6 +28137,8 @@ class EventHandler {
|
|
|
28037
28137
|
_scope = null; // Task|Subtask|Global
|
|
28038
28138
|
_task = null;
|
|
28039
28139
|
_taskMgdID = -1;
|
|
28140
|
+
_defRouteName = null;
|
|
28141
|
+
_isExecutingDefaultRoute = false;
|
|
28040
28142
|
/// <summary>
|
|
28041
28143
|
/// CTOR
|
|
28042
28144
|
/// </summary>
|
|
@@ -28165,6 +28267,9 @@ class EventHandler {
|
|
|
28165
28267
|
case ConstInterface.MG_ATTR_HANDLER_ONFORM:
|
|
28166
28268
|
this._isHandlerOnForm = XmlParser.getBoolean(valueStr);
|
|
28167
28269
|
break;
|
|
28270
|
+
case XMLConstants.MG_ATTR_DEF_ROUTER_NAME:
|
|
28271
|
+
this._defRouteName = XmlParser.unescape(valueStr);
|
|
28272
|
+
break;
|
|
28168
28273
|
default:
|
|
28169
28274
|
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventHandler class. Insert case to EventHandler.initElements for " + attribute);
|
|
28170
28275
|
break;
|
|
@@ -28393,8 +28498,15 @@ class EventHandler {
|
|
|
28393
28498
|
await this.resetLocalVariables(args);
|
|
28394
28499
|
initialLoopStackSize = this._task.getLoopStackSize();
|
|
28395
28500
|
let retVals = null;
|
|
28396
|
-
if (this._operationTab.getSize() > 0)
|
|
28501
|
+
if (this._operationTab.getSize() > 0) {
|
|
28397
28502
|
retVals = await this.executeOperations(0, this._operationTab.getSize() - 1, taskEnd, mgdID, depth, isChangedCurrWndRef, false, false, -1);
|
|
28503
|
+
if (retVals == null && this.isRouteHandler() && this.getDefaultRouteName() != null) {
|
|
28504
|
+
this._isExecutingDefaultRoute = true;
|
|
28505
|
+
// call again with an additional param Default Route Name
|
|
28506
|
+
retVals = await this.executeOperations(0, this._operationTab.getSize() - 1, taskEnd, mgdID, depth, isChangedCurrWndRef, false, false, -1);
|
|
28507
|
+
this._isExecutingDefaultRoute = false;
|
|
28508
|
+
}
|
|
28509
|
+
}
|
|
28398
28510
|
isChangedCurrWnd = isChangedCurrWndRef.value;
|
|
28399
28511
|
if (retVals !== null)
|
|
28400
28512
|
return retVals;
|
|
@@ -28474,6 +28586,9 @@ class EventHandler {
|
|
|
28474
28586
|
}
|
|
28475
28587
|
return new RetVals(retVal, true);
|
|
28476
28588
|
}
|
|
28589
|
+
isExecutingDefaultRoute() {
|
|
28590
|
+
return this._isExecutingDefaultRoute;
|
|
28591
|
+
}
|
|
28477
28592
|
/// <summary>
|
|
28478
28593
|
/// execute the operations starting from fromIdx and ending at endIdx.
|
|
28479
28594
|
/// </summary>
|
|
@@ -28813,6 +28928,12 @@ class EventHandler {
|
|
|
28813
28928
|
getEvent() {
|
|
28814
28929
|
return this._evt;
|
|
28815
28930
|
}
|
|
28931
|
+
isRouteHandler() {
|
|
28932
|
+
return (this._evt.getType() == ConstInterface.EVENT_TYPE_INTERNAL && this._evt.getInternalCode() === InternalInterface.MG_ACT_WEBCLIENT_ROUTE);
|
|
28933
|
+
}
|
|
28934
|
+
getDefaultRouteName() {
|
|
28935
|
+
return this._defRouteName;
|
|
28936
|
+
}
|
|
28816
28937
|
/// <summary>
|
|
28817
28938
|
/// get the Id of the event handler
|
|
28818
28939
|
/// </summary>
|
|
@@ -29903,6 +30024,7 @@ class Task extends TaskBase {
|
|
|
29903
30024
|
_loopStack = null;
|
|
29904
30025
|
allowRemoteCmdExecution;
|
|
29905
30026
|
DelayCommandExecution = false;
|
|
30027
|
+
MainPrgCtlPath = null;
|
|
29906
30028
|
///<summary>
|
|
29907
30029
|
/// This is the task which invoked the handler containing the Call operation.
|
|
29908
30030
|
/// This member is used for searching the variables like VarIndex(), etc
|
|
@@ -30462,6 +30584,12 @@ class Task extends TaskBase {
|
|
|
30462
30584
|
message.Append(XMLConstants.START_TAG + XMLConstants.MG_TAG_TASK);
|
|
30463
30585
|
message.Append(" " + XMLConstants.MG_ATTR_TASKID + "=\"" + this.getTaskTag() + "\"");
|
|
30464
30586
|
message.Append(" " + ConstInterface.MG_ATTR_TASK_MAINLEVEL + "=\"" + this.getMainLevel() + "\"");
|
|
30587
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing && this.isMainProg) {
|
|
30588
|
+
// While sending context reinitialize request, send the application path for main program
|
|
30589
|
+
// This path will be used to match mainprogram on server side while updating its dataview
|
|
30590
|
+
Debug.Assert(this.MainPrgCtlPath.length > 0);
|
|
30591
|
+
message.Append(" " + XMLConstants.MG_MAINPRG_CTL_PATH + "=\"" + this.MainPrgCtlPath + "\"");
|
|
30592
|
+
}
|
|
30465
30593
|
message.Append(XMLConstants.TAG_CLOSE);
|
|
30466
30594
|
await this.DataView.buildXML(message);
|
|
30467
30595
|
if (this.Form != null && this.Form.Opened)
|
|
@@ -37333,6 +37461,13 @@ class EventsManager {
|
|
|
37333
37461
|
case InternalInterface.MG_ACT_SET_EXTERNAL_VALUE:
|
|
37334
37462
|
let refreshDisplay = await evt.getArgList().getArgValue(1, StorageAttribute.BOOLEAN, 0) === '1' ? true : false;
|
|
37335
37463
|
await ctrl.validateAndSetValueIfAllowed(evt.getValue(), refreshDisplay);
|
|
37464
|
+
//We will be here if we type in character(s)
|
|
37465
|
+
//And if the control has Autocomplete Mode and On Demand property set to true, we need to display the autocomplete list
|
|
37466
|
+
//based on whatever value user has typed. So, excute ControlItemsRefresh command to fetch the data control's values.
|
|
37467
|
+
if (ctrl.isOnDemandSelectionList()) {
|
|
37468
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(task.getTaskTag(), ctrl, evt.getValue());
|
|
37469
|
+
await task.DataviewManager.CurrentDataviewManager.Execute(command);
|
|
37470
|
+
}
|
|
37336
37471
|
break;
|
|
37337
37472
|
}
|
|
37338
37473
|
}
|
|
@@ -39507,7 +39642,7 @@ class CommandsTable {
|
|
|
39507
39642
|
}
|
|
39508
39643
|
}
|
|
39509
39644
|
|
|
39510
|
-
let CurrentClientVersion = '4.
|
|
39645
|
+
let CurrentClientVersion = '4.1201.0-dev000.0';
|
|
39511
39646
|
|
|
39512
39647
|
// @dynamic
|
|
39513
39648
|
class ClientManager {
|