Support Article
Show busy indicator on click of a pxButton
SA-17733
Summary
User wants to display busy indicator on click of a button.
ERROR MESSAGES
N/a
Steps to Reproduce
User has configured two buttons, on click of them they are running an activity and refreshing the current section. The activity invokes a service call. Expectation is busy indicator should always display.
ROOT CAUSE
User requirement.
Resolution
Perform the following local-change:
1) Either in user work form or a text js file, write these functions
<script>
Test = function()
{
pega.u.d.busyIndInterval = 0;
pega.u.d.setBusyIndicator();
}
Hide = function()
{
pega.u.d.busyIndInterval = 2000;
if(pega.u.d.gBusyInd){
pega.u.d.gBusyInd.hide();
}
}
</script>
Ignore the script tags if you put it in the js file.
2) Add events “Run script” on the button and call the respective functions (Test and Hide)
Invoking sleep method to mimic delay
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.