How to show the OOTB Processing Icon and disable the screen on click of Custom Button
HI There ,
I have a requirement to disable the entire section on click of a button so that user doesn't have an option to choose anything on the screen or submit to move forward. On click of the button we are making back to back SOAP calls to fetch data. To handle this requirement I have added Refresh Current Harness, Refresh section event on click of the button. But by doing so it is not showing Pega OOTB loading image. how do we achieve this requirement.
Thanks in Advance,
I see that you are looking to disable the editing capability for end user for the entire section, for that you are looking to show "busy indicator" (processing icon) to appear on the section to make it to convey that it is still loading not to enter anything, If I am correct, the please see my recommendation below.
1) Please dont configure "Refresh current harness", this will make the entire window reload, so that needed parameters to show the busy indicator also reloads here, so there would be a undefined target to show the busy indicator when refresh the harness, so our effort or implementation to show the icon will be undefined or error prone. Hence, you dont see busy icon, please remove this configuration.
2) You can keep the "Refresh section". As per product design, if a section (or any ajax request) takes more than 2 seconds to get the response from server then we show busy indicator by default. So, our goal is make the ajax request (section reload) to take more time to show the icon, this can be done simply by configuration a pre-activity for the "Refresh section" action. Please use step method "wait" in activity step and give some value which suits the requirement. The bad with this is, you should know the wait time when configuring this. If the value always vary, Please follow the non-auto way of implementing the same.
a) Open the harness (the most recent one when you go through live ui) and add "pzShowBusyIndicator" js file to it as shown below
b) Go to the button (where you configure refresh this section) and implement the RunScript action to show busy indicator as shown below (This action must be very first one in the list of actions)
c) Use following action (This should be the last one in list of actions ) to enforce the busy indicator to disappear
Thats it !! It should show you busy indicator and then it goes off, This duration of busy icon appearance is based on the time to execute the step RunActivity (in your case "Refresh this section") . If you want to increase the duration of the icon appearance then you would find a different place for the "hide" method call that is last "RunScript" call.
Please feel free to post your thoughts and questions if any.
Thank you !!
Keep up to date on this post and subscribe to comments
- On click of a button we calling Refresh Section and a activity and the Close action, but this randomly shows Status Success screen, any ideas on this
- How to show processing message to user like (Loading....) on click of button
- On click of icon, a list of option should appear same as in Pega when we click on OPERATOR MENU but here, I need to select one of the options then user will click on GO button to perform some action
- Unwanted mobile device keyboard show up on button click and radio button click
- In Pega 7 and above- Is there a OOTB feature to show a help icon for selective fields on a UI form?