ebs.showLoadingPanel
(FintechOS Studio 20.2.1 and later)
Displays a loading screen animation until reaching the end of the current code block.
Also see ebs.hideLoadingPanel.
Syntax
Copy
function ebs.showLoadingPanel(): void;
Examples
In this example, we set up a button that calls a server-side process and displays a loading animation in the meanwhile:
- We create a click event handler for the calculateInterest button.
- We call the calculateInterest endpoint which exposes our server automation script and pass it the interestRate and principal input parameters.
- For details on how to call server automation scripts, see ebs.callActionByNameAsync.
- For details on how to access the current record's attributes, see formData.model.
- We display the loading animation using the ebs.showLoadingPanel() function. The animation will run until the code block is closed (the server automation script call is resolved).
NOTE
Sometimes, code blocks execute too fast to have the loading animation displayed. If you wish to test the ebs.showLoadingPanel() function, you may use the delayMSec function on the server side or the setTimeout function on the client side to set up delays in the code execution.
Sometimes, code blocks execute too fast to have the loading animation displayed. If you wish to test the ebs.showLoadingPanel() function, you may use the delayMSec function on the server side or the setTimeout function on the client side to set up delays in the code execution.
Copy
$('#calculateInterest').on('click', function (event) {
ebs.callActionByNameAsync('calculateInterest', { 'interestRate': formData.model.interestRate, 'principal': formData.model.principal})
ebs.showLoadingPanel();
});