A handler specifies what happens when a normal action is triggered or response or failure is received after a save, submit or upload action is triggered.
Each handler has the following four parts:
-
assignments: assign the given values to certain fields
-
updates: update certain fields using the given values through update methods
-
next: next stage
-
redirect: redirect outside to a different URL, for example, after a user is successfully authenticated at the login page.
Default Value
An array of { “field”:..., “value”: … }
General
Assign the given values to certain fields. An array of { “field”:..., “value”: … }
, where
-
field: a variable expression
-
An actor’s property or appearance
-
$nav(actorName).property(fieldName);
-
$nav(actorName).appearance(fieldName);
-
-
The current actor’s data
-
$this.attr(fieldName);
-
-
Other actor’s data
-
$state(actorName).attr(fieldName);
-
-
Global data
-
$global.attr(fieldName);
-
-
-
value: a JS value or a variable expression
-
The arguments from built-in handlers
-
$args[index];
-
$args[index].attr(fieldName);
-
-
The remote response
-
$result;
-
$result.attr(fieldName);
-
-
An actor’s property or appearance
-
$nav(actorName).property(fieldName);
-
$nav(actorName).appearance(fieldName);
-
-
The current actor’s data
-
$this.attr(fieldName);
-
-
Other actor’s data
-
$state(actorName).attr(fieldName);
-
-
Global data
-
$global.attr(fieldName);
-
-
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
TBC |
Code JSON
Implementation Example
The following handler assignment sets the URL of the document preview iframe using the attachment Id from the first record of the DocCat_Attachment children relationship.
Example 82. Code JSON
"assignments": [{ "field": "$nav(PreviewPageInclude).property(url);", "value": "/servlet/servlet.FileDownload?file=$this.attr(clcommon__DocCat_Attachment_Associations__r).attr(clcommon__Attachment_Id__c);" }]
In the following handler assignment, after the save action succeeds, the saved record is returned as a response. Use the Id of the saved record to query property (whereClause.recordId
) the data in FinancialDetailView
and move to the second step of ApplicationSteps
.
Example 83. Code JSON
"assignments": [{ "field": "$nav(FinancialDetailView).property(whereClause.recordId);", "value": "$result.attr(id);" }, { "field": "$nav(ApplicationSteps).appearance(current);", "value": 1 }]
In the following handler assignment, the remote API returns an array of all the children relationship records from DocCat_Attachment_Association
. Use the response to set the component’s children relationship data.
Example 84. Code JSON
"assignments": [{ "field": "$this.attr(clcommon__DocCat_Attachment_Associations__r);", "value": "$result;" }]
In the following handler assignment, sessionId
is a global attribute specified in navigation JSON. Use it to query BorrowerCardView
and GuarantorCardView
and move to the third step of ApplicationSteps
.
Example 85. Code JSON
"assignments": [{ "field": "$nav(BorrowerCardView).property(whereClause.Guest_Account__c);", "value": "$global.attr(sessionId);" }, { "field": "$nav(GuarantorCardView).property(whereClause.Guest_Account__c);", "value": "$global.attr(sessionId);" }, { "field": "$nav(ApplicationSteps).appearance(current);", "value": 2 }]
The following handler assignment uses the ID of the first record in the current component to query property (whereClause.recordId
)the data in BorrowerDetailView
.
Example 86. Code JSON
"assignments": [{ "field": "$nav(BorrowerDetailView).property(whereClause.recordId);", "value": "$this.attr(id);" }, { "field": "$nav(ApplicationSteps).appearance(current);", "value": 0 }]
The following handler assignment sets BorrowerDetailView
’s whereClause
to null
so that the component displays a new view.
Example 87. Code JSON
"assignments": [{ "field": "$nav(BorrowerDetailView).property(whereClause);", "value": null }]
In the following handler assignment, clickRecord
is a built-in handler in component actor. It takes the record being clicked as the first and only argument. Use the Application__c
value in the first argument (a clicked record) to set the query.
Example 88. Code JSON
"clickRecord": { "assignments": [{ "field": "$nav(BusinessDocumentQueueView).property(whereClause.applicationId);", "value": "$args[0].attr(genesis__Application__c);" }], "trigger": "APPLICATION_DETAILS" }
The following handler assignment uses the response from a remote API ($result;) to set data of a component.
Example 89. Code JSON
"componentActions": [{ "name": "save", "actionType": "submit", "remoteActionClassname": "sampleRemoteApi", "successHandler": { "assignments": [{ "field": "$nav(ApplicationSteps).appearance(current);", "value": 1 }, { "field": "$state(FinancialDetailView);", "value": "$result;" }] } }]
Default Value
An array of { “name”: …, “value”: … }
General
Update certain fields using the given values through update methods. Sometimes, we need to update values based on what they are. Then we cannot use assignments. Updates are for special cases ONLY. (We have three built-in updates so far.)
-
Add reloads:
$nav.reloads.add
with an actorName or an array of actorNames -
Add overlay (modal dialogs):
$nav.overlay.add
with a layout name or an array of layout names -
Remove overlay (modal dialogs):
$nav.overlay.remove
with a layout name or an array of layout names(need it because some actions (not the built-in close button) in the overlay can cause it to close.)
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
TBC |
Implementation Example
In the following handler update, after the save succeeds, mark reload
to the two actors, the BorrowerCardView
and the GuaranterCardView
. When we display those actors again, they will query the data from the server (even though they have data already since the data is considered stale) and remove their own reload
flag.
Example 90. Code JSON
"successHandler": { "assignments": [...], "updates": [{ "name": "$nav.reloads.add;", "value": [ "BorrowerCardView", "GuarantorCardView" ] }] }
In the following handler update, overlay
is an array
of layouts
, which specifies all modal dialogs that can be open in the current stage.
Example 91. Code JSON
"ApplciationDetailPage": { "layout": {...}, "overlay": [{ "name": "preview", "children": [{ "name": "PreviewPageInclude" }] }] }
In the following handler update, when the preview action is triggered, the preview
layout in the overlay
is added to the current overlay array, and thus displayed as a modal dialog. By default, the overlay array is empty, and thus no modal dialog is displayed.
Example 92. Code JSON
"recordActions": [{ "name": "preview", "actionType": "normal", "handler": { "assignments": [...], "updates": [{ "name": "$nav.overlay.add;", "value": "preview" }] }...
Default Value
General
Can be variable expression too
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
TBC |
Example 93. Code JSON
"componentActions": [{ "name": "login", "actionType": "submit", "label": "Log In", "remoteActionArguments": { "username": "$this.attr(username);", "password": "$this.attr(password);" }, "remoteActionAPIname": "login", "successHandler": { "redirect": "$result;" } }] “redirect”: url “redirect”: { “url”: url, “target”: “_blank” }
Default Value
General
Handler from one action can conditionally trigger other actions (in the same or different actors)
-
The triggered action can be rendered false.
-
But the actor has to be in the current stage.
Status
Release Available |
Status |
Framework Name |
---|---|---|
2.8 |
Current |
TBC |
Example 94. Code JSON
successHandler: { "assignments": […] "updates": […] "cruds": […] "actions": [ { "condition": "$result...", "actorName": …, "name": … } ] }
Implementation Example
Example 95. Code JSON
"AccountDetails2": { "componentActions": [{ "name": "save", "actionType": "save", "successHandler": { "assignments": [{ "field": "$state(AccountDetail2);", "value": "$result;" }], "actions": [{ "actorName": "ContactList", "name": "saveContacts" }] } }]…} "ContactList": { "componentActions": [{ "name": "saveContacts", "actionType": "save", "appearance": { "render": false }, "remoteActionArguments": { "AccountId": "$state(AccountDetail2).attr(id);" }, }]…}
Default Value
General
The portal framework can be configured to trigger external JS code for certain use cases.
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.2 |
Current |
TBC |
Implementation Example
loan calculation – when the residual amount or term changes, update interest rate and monthly payment in real-time.
Example 96. Code JSON
"generalHandlers": { "fieldChange": { "genesis__Residual_Amount__c, genesis__Payment_Frequency__c": { "assignments": [{ "field": "$this.attr(genesis__Interest_Rate__c);", "value": "$ext.calculateInterestRate", "arguments": [ "$this.attr(genesis__Residual_Amount__c);", "$this.attr(genesis__Payment_Frequency__c);" ] }, { "field": "$this.attr(genesis__Payment_Amount_Per_Period__c);", "value": "$ext.calculateMonthlyPayment", "arguments": [ "$this.attr(genesis__Residual_Amount__c);", "$this.attr(genesis__Payment_Frequency__c);" ] }]...
-
The external JS function returns the value that can be assigned to another field in real-time.
Example 97. Code JSON
portalext.calculateMonthlyPayment = (amount, term) => { const rate = calcInterestRate(amount, term); let calTerm = term/12; if (rate == 0) { return 0; } term = Number.parseInt(term); if (Number.isNaN(term)) { return 0; } let perRate = rate/12; return (amount * (perRate * (1+perRate) ** term)) / ((1+perRate) ** term - 1); };
General
Assign a value to a specific record (not just the first record) in a list/queue/card view.
Example 98. Code JSON
"assignments": [{ "field": "$global.attr(contactId);", "value": "$this.attr(id);" }]
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.4 |
Current |
TBC |
Implementation Example
Example 99. Code JSON
"assignments": [{ "field": "$state(ContactList).attr(AccountId);", "value": "$interaction.attr(highlighted).attr(id);", "recordId": "$global.attr(contactId);"}],
An actor may have generalHandlers
, which can be triggered without the actor’s actions
(componentActions
and recordActions
).
If clickRecord
is specified under generalHandler
, clicking an entry in a component actor will trigger the handler. The clickRecord
takes the clicked entry data as its only argument.
Default Value
"generalHandlers": {"clickRecord": {"assignments": [{"field": ... "value": ... }]
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
MUI and Mint |
Example 100. Code JSON
"ApplicationCardView": { "category": "component", "type": "card-view", "property": {...}, "generalHandlers": { "clickRecord": { "assignments": [{ "field": ... "value": ... }], "next": "ApplicationDetailView" }...
Status
Release Available |
Status |
Framework Name |
---|---|---|
4.2 |
Current |
Mui and Mint |
General
The following handlers are available to support adding additional functional logic on expand/collapse actions:
Note
The expandAll and collapseAll handlers for Dynamic Container or Card-view and the expandAllGroups and collapseAllGroups handlers for Groups are unavailable for the Mint framework.
-
Handlers for the Dynamic Container and card-view entry-level expand and collapse
-
expand - To expand a single entry.
-
collapse - To collapse a single entry.
-
expandAll - To expand all entries at once.
-
collapseAll - To collapse all entries at once.
-
-
Handlers for the Group expand and collapse
-
expandGroup - To expand a single entry.
-
collapseGroup - To collapse a single entry.
-
expandAllGroups - To expand all entries at once.
-
collapseAllGroups - To collapse all entries at once.
-
Example 101. Handlers - Code JSON
"collapse": { "actions": [ { "name": "collapseAction" } ] }, "collapseAll": { "actions": [ { "name": "collapseAllAction" } ] }, "collapseAllGroups": { "actions": [ { "name": "collapseAllGroupsAction" } ] }, "collapseGroup": { "actions": [ { "name": "collapseGroupAction" } ] }, "expand": { "actions": [ { "name": "expandAction" } ] }, "expandAll": { "actions": [ { "name": "expandAllAction" } ] }, "expandAllGroups": { "actions": [ { "name": "expandAllGroupsAction" } ] }, "expandGroup": { "actions": [ { "name": "expandGroupAction" } ] }
Example 102. Actions - Code JSON
{ "name": "expandGroupAction", "actionType": "normal", "property": {}, "appearance": { "label": "expandAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Expand Action", "content": "Group is expanded", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }, { "name": "collapseGroupAction", "actionType": "normal", "property": {}, "appearance": { "label": "collapseAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Collapse Action", "content": "Group is collapsed", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }, { "name": "expandAllGroupsAction", "actionType": "normal", "property": {}, "appearance": { "label": "expandAllAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Expand All Action", "content": "All Groups are expanded", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }, { "name": "collapseAllGroupsAction", "actionType": "normal", "property": {}, "appearance": { "label": "collapseAllAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Collapse All Action", "content": "All Groups are collapsed", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }, { "name": "expandAction", "actionType": "normal", "property": {}, "appearance": { "label": "expandAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Expand Action", "content": "Entry is expanded", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }, { "name": "collapseAction", "actionType": "normal", "property": {}, "appearance": { "label": "collapseAction", "position": "bottom-right", "render": false, "style": "primary" }, "confirmation": { "title": "Collapse Action", "content": "Entry is collapsed", "closeText": "Ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }
The fieldChangeCommit handler is only for the range field. The handler will be triggered when a user drags the thumb of a slider and release the mouse. The handler can trigger actions.
Default Value
"generalHandlers": {
"fieldChangeCommit": {
"loanAmount": {
"actions": [
{
"name": "submitLoanAmount"
}
]
}
}
}
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.4 |
Current |
MUI and Mint |
Code JSON
"generalHandlers": { "fieldChangeCommit": { "loanAmount": { "actions": [ { "name": "submitLoanAmount" } ] } } }
"fields": { "fieldName": "loanAmount", "fieldUi": { "fieldType": "range",...
"componentActions": [ { "name": "submitLoanAmount", "actionType": "submit",
Status
Release Available |
Status |
Framework Name |
---|---|---|
v3 |
Current |
MUI and Mint |
Example 103. Code JSON
"generalHandlers": { "fieldChange": { "field_name": { "assignments": [...], "Updates": [...] } } }
Value can be dynamically calculated using fieldChange
handler and mathjs
.
@mathjs{…};
Status
Release Available |
Status |
Framework Name |
---|---|---|
2.7.1 |
Current |
TBC |
Example 104. Code JSON
generalHandlers: { "fieldChange": { "totalAmount, months": { "assignments": [{ "field": "$this.attr(monthlyAmount);", "value": "@mathjs{$this.attr(totalAmount); / $this.attr(months);};" }] } } }
Implementation Example
Example 105. Code JSON
generalHandlers { "fieldChange": { "principal, annualInterest, compoundTimes, years": { "assignments": [{ "field": "$this.attr(amount);", "value": "@mathjs{$this.attr(principal); * ((1 + $this.attr(annualInterest); / $this.attr(compoundTimes);) ^ ($this.attr(compoundTimes); * $this.attr(years);))};" }] } } }
-
The multi-step calculation can be used for complicated loan calculations (in assignments ONLY).
-
Each step is a calculation assigned to an intermediate variable, which can be used in the following steps.
-
To avoid name conflict, the intermediate variable's name should NOT start with var, which is internally used by the portal framework.
-
The variable name of the last step must be final, which holds the final calculated value.
-
Status
Release Available |
Status |
Framework Name |
---|---|---|
2.8.1 |
Current |
TBC |
Example 106. Code JSON
"assignments": [{ "field": "$this.attr(totalAmount);", "mathValue": [ "x = …", "y = …", "final = …" ] }]
Implementation Example
-
Users can specify a loan amount between 75000 and 150000.
-
Interest changes with the different loan amounts.
-
Total amount = Loan Amount * (1 + selected interest rate)
variable |
1 year |
3 |
5 |
8 |
10 |
|
---|---|---|---|---|---|---|
Loan amount < 100000 (50%) |
4.2 |
4.4 |
4.4 |
4.5 |
4.8 |
5 |
Loan amount < 120000 (60%) |
4.4 |
4.6 |
4.6 |
4.7 |
5 |
5.2 |
Loan amount < 140000 (70%) |
4.6 |
4.8 |
4.8 |
4.9 |
5.2 |
5.4 |
Example 107. Code JSON
"fields": [{ "fieldName": "loanAmount", "fieldUi": { "fieldType": "range", "label": "Loan Amount", "rangeOptions": { "min": 75000, "max": 150000, "step": 1000 }, "tickMarks": [{ "text": "60%", "position": "@mathjs{ (120000 - 75000) / (200000 - 75000) };" }, { "text": "70%", "position": "@mathjs{ (140000 - 75000) / (200000 - 75000) };" }] }},
Example 108. Code JSON - for 50%
{ "fieldName": "interest50", "fieldUi": { "fieldType": "picklist", "label": "Interest (50%)", "defaultValue": "variable", "selectOptions": [ { "optionText": "4.2% (Variable)", "optionValue": "variable" }, { "optionText": "4.4% (1 Year)", "optionValue": "1y" }, { "optionText": "4.4% (3 Years)", "optionValue": "3y" }, { "optionText": "4.5% (5 Years)", "optionValue": "5y" }, { "optionText": "4.8% (8 Years)", "optionValue": "8y" }, { "optionText": "5.0% (10 Years)", "optionValue": "10y" } ]}}, { "fieldName": "interest60",…}, { "fieldName": "interest70",…}
Example 109. Code JSON - appearance
"appearance": { "renderFields": { "interest50": "($this.attr(loanAmount); / 200000) < 0.5", "interest60": "($this.attr(loanAmount); / 200000) >= 0.5 and ($this.attr(loanAmount); / 200000) < 0.6", "interest70": "($this.attr(loanAmount); / 200000) >= 0.6" }
Example 110. Code JSON - fieldChange Handler
"generalHandlers": { "fieldChange": { "loanAmount, interest50, interest60, interest70": { "assignments": [{ "field": "$this.attr(totalAmount);", "mathValue": [ "i50 = $this.attr(interest50);", "i60 = $this.attr(interest60);", "i70 = $this.attr(interest70);", "r50 = i50 == \"variable\" ? 4.2 : (i50 == \"1y\" ? 4.4 : (i50 == \"3y\" ? 4.4 : (i50 == \"5y\" ? 4.5 : (i50 == \"8y\" ? 4.8 : 5.0))))", "r60 = i60 == \"variable\" ? 4.4 : (i60 == \"1y\" ? 4.6 : (i60 == \"3y\" ? 4.6 : (i60 == \"5y\" ? 4.7 : (i60 == \"8y\" ? 5.0 : 5.2))))", "r70 = i70 == \"variable\" ? 4.6 : (i70 == \"1y\" ? 4.8 : (i70 == \"3y\" ? 4.8 : (i70 == \"5y\" ? 4.9 : (i70 == \"8y\" ? 5.2 : 5.4))))", "perct = $this.attr(loanAmount); / 200000", "rate = perct < 0.5 ? r50 : (perct < 0.6 ? r60 : r70)", "final = $this.attr(loanAmount); * (1 + rate/100)" ]} ]}
The loaded
handler in generalHandlers
is triggered when a component finishes loading its data or a content finishes loading its content.
Default Value
"generalHandlers": {"loaded": {"assignments": […], "updates": […], … }}
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.3 |
Current |
MUI and Mint |
Example 111. Code JSON
"generalHandlers": { "loaded": { "assignments": [...], "Updates": [...], ... } }
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
MUI and Mint |
Example 112. Code JSON
"generalHandlers": { "selectRecord": {handler}, "deselectRecord": {handler}, "selectAllRecords": {handler}, "deselectAllRecords": {handler}, "selectMultipleRecords": {handler} }
An actor with an HTML snippet can trigger navigate
action, which needs to be handled by navigate generalHandler
, which is a map of navigate
name and the corresponding handler.
-
<tagnavigate=“navigateName”/>
-
“actorName”: {“generalHandlers”: {“navigate”: {“navigateName”: {...}
Default Value
“actorName”: {“generalHandlers”: {“navigate”: {“navigateName”: {...}
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
MUI and Mint |
Implementation Example
Switch handler is introduced for actors in the container category, such as steps and tabs. This handler allows the Portal admin to configure to perform an action before or after switching tabs or steps. For example, to show a confirmation dialog box after a user switches to a new tab.
There are the following two types of switch handlers:
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.9 |
Current |
MUI and Mint |
Note
For Mint, the Switch handler is supported only for Tabs and not for the Steps. This is because the Steps are not clickable in Mint.
It is used when we need to perform some actions both before and after switching tabs or steps.
Generally, Broker portals are not guided flows as the brokers are more trained on the system. And in such a system if the broker is making multiple changes on multiple pages (tabs or steps) then there is a chance that some of the changes may go unsaved. To solve this problem, an idea is to autosave the current tab or step changes when moving from the current tab or step to another. To accommodate this use case we can use the complex Switch handler.
Syntax
"switch" : { "before" : {….} "condition" : "", "after" : {….} }
The above syntax contains the following fields:
-
Before handler: Configure anything that should happen before switching to a new tab or step.
-
Condition: Configure an expression that evaluates to a boolean. This indicates when the after-handler trigger should happen.
-
After handler: Configure anything that should happen after switching to a new tab or step.
The beforeevent handler gets executed when the user clicks on any other step or tab and the conditionindicates when to execute the afterevent handler.
-
Each container should have a unique flag mentioned in General Handler.
-
The container should pass the same flag to the respective save action.
-
The Child Container should have a Master action which should contain all the assignments mentioned in General Handler.
-
The Child Container flag should be set under the parent Container General handler.
-
The Conditional assignment is Mandatory.
-
Each container should have a unique flag mentioned in General Handler.
-
The container should pass the same flag to the respective save action.
-
The Child Container should have a Master action which should contain all the assignments mentioned in General Handler.
-
The Child Container flag should be set under the parent Container General handler.
-
The Conditional assignment is Mandatory.
-
When a user uses Action (Next or Back button) that time we need to mention all the assignments under respective action.
-
When a user uses Stepper Navigability, the user has to mention all the assignments under General Handler.
-
When a user uses Action (Next or Back button) as well as Stepper Navigability, the user has to mention all the assignments under respective action and also under General Handler.
In the following example, we have a tabs actor named "TabsActor" with multiple tabs. Out of these tabs, only the first tab has an input form and a save action, while other tabs are just read-only data views. When the user makes some changes in the first tab and moves to another tab, the configured switch handler takes care of saving data automatically. And only when the first tab data is saved successfully the user moves to another tab. In case of errors, the user must correct the issues before proceeding to other tabs.
Example 115. Code JSON
"switch": { "before": { "assignments": [{ "field": "$global.attr(triggeredSwitchEvt);", "value": true }], "actions": [{ "condition": "$nav(TabsActor).appearance(current); == 0", "actorName": "RangeFieldActor", "name": "save" },{ "condition": "$nav(TabsActor).appearance(current); != 0", "name": "setProceedToNextStepOrTabFlag" }] },
Example 116. Code JSON
"after": { "assignments": [{ "field": "$global.attr(proceedToNextStepOrTab);", "value": false },{ "field": "$global.attr(triggeredSwitchEvt);", "value": false }], "actions": [{ "name": "showConfirmationAfterSwitch" }] }, "condition": " $global.attr(triggeredSwitchEvt); and $global.attr(proceedToNextStepOrTab);" } }
You can create multiple actions within the same action with conditional trigger actions. This eliminates the need to create numerous actions to achieve the same results.
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.9 |
Current |
Mint and Mui |
Example 117. Code JSON
"assignments": [ { "condition": "$global.attr(ListtriggeredSwitchEvt);", "field": "$global.attr(ListproceedToNextStepOrTab);", "value": true }, { "condition": "$global.attr(triggeredSwitchEvt);", "field": "$global.attr(proceedToNextStepOrTab);", "value": true } ]
It is used when we need to perform some actions after switching tabs or steps.
To show a confirmation dialog box on switching tabs.
Action config
Example 119. Code JSON
{ "name": "showConfirmationOnSwitch", "actionType": "normal", "property": {}, "appearance": { "render": false, "label": "show Confirmation On Switch", "style": "primary", "position": "bottom-right" }, "confirmation": { "title": "Confirmation On Switch", "content": "Confirmation On Switching to a new Tab/Step", "closeText": "ok", "cancelOrCloseHandler": {} }, "successHandler": {}, "failureHandler": {}, "pendingHandler": {}, "handler": {} }
The pendingHandler
is a special handler. If an action has pendingHandler
, the main purpose is to use the $result
from the PENDING
response to update the remoteActionArguments
and re-send the same request.
Status
Release Available |
Status |
Framework Name |
---|---|---|
Initial |
Current |
MUI and Mint |
Implementation Example
In the following example, a new variable name is introduced $remoteArgs
.
Example 120. Code JSON
{ "actionType": "submit", "remoteActionArguments": { "guestAccountId": "$global.attr(sessionId);", "applicationId": "$this.attr(applicationId);" }, "pollingPeriod": 3000, "pollingMaxTries": 3, "pendingHandler": { "assignments": [ {"field": "$remoteArgs(applicationId);", "value": "$result;"} ] }}