Support Article
Cancel button in modal dialog does not work correctly
SA-64544
Summary
Cancel button in modal dialog does not work correctly.
Error Messages
Not Applicable
Steps to Reproduce
- Configure a button.
- OnClick of the button launches a local action.
- In the configured local action, a grid with progressive pagination is configured with the data source as the datapage and a checkbox in the grid.
- At runtime, when the modal dialog is launched, select a few checkboxes.
- Click Cancel.
- Launch the modal dialog. The checkboxes are still selected.
Root Cause
This behavior is as per Pega product design.
Resolution
Perform the following local-change:
On click of the Cancel button invokes the pyModalPageCancelAction activity which is an Available rule. Embed logic according to the below solutions.
Solution 1:
Perform the following to clear all the edited datapage values..
- Use FlushDeclarativePage activity.
- Send the datapage as a parameter to the activity.
- Modify the Java step of FlushDeclarativePage activity to handle multiple datapage values.
Solution 2:
For checkboxes, iterate over the datapage results and set the checkboxes to false.
Published October 13, 2018 - 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.