Hello everyone,
My APEX version is 23.1.0.
I encountered a situation where a user clicked multiple times on the submission button on an update page.
This situation is quite unusual, but here is how I explain the consequence of this multi-click.
This update page has a before rendering process where several used collections are emptied, then reloaded based on the ID of the object we are editing. Nothing special, and then collections are used in interactive grids.
After the first click, several processes starts executing, especially the update process in the database, which takes a few seconds to complete, and for the branching to occur.
In this case, the user was impatient and clicked the submission button a second time.
As a result, I lost all the data related to the collections. Other data (simple page items) were correctly updated. I try to explain this result.
My explanation: after the second click on the submission button, the page seems to reload, which makes sense as a submit action — the Before Rendering process, which empties the collections, runs again (I think!). At this moment, the first “thread” of processes, related to the first button click is running, and when the collections are checked, they are empty
=> lose of data related to the collections.
I'm not sure if the way I explain this result is correct, but I never got problems before, I think even clicking multiple times…
However, whatever the reason :
My goal and question : Is there a way to prevent multiple clicks on a submission button, maybe natively ?
Thank you for your insight!