A Single Dynamic Action to Refresh Multiple Reports

Normally, if you want to refresh a report after a Modal Dialog closes you would create a “Dialog Closed” Dynamic Action (DA), and the True action would be Refresh selection the Report.

However, recently I had a very interesting situation where a page had many reports that could open a dialog. Let’s just call it dozens of reports for the sake of argument.
In this situation, instead of creating a single DA per report, what if we could have one single DA that would “listen” for change on ALL “Dialog Closed” events.
To accomplish this, instead of selecting a specific report you can use a jQuery Selector that represents all your regions, for example, those with the class “t-Region”.
Then the True action can use the this.triggeringElement set by the DA and call apexrefresh to refresh the region that just had a dialog closed:

$(this.triggeringElement).trigger("apexrefresh");

Hi, I'm Jorge Rimblas. Father, husband, photographer, Oraclenerd, Oracle APEX expert, Oracle ACE, coffee lover, car guy, gadget addict, etc... I'm a Senior APEX Consultant with Insum Solutions, a consulting firm specialized in Oracle databases and the APEX development tool. I have worked with Oracle since 1995 and done eBusiness Suite implementations and customizations. Nowadays I specialize almost exclusively in Oracle APEX.

1 Comment on “A Single Dynamic Action to Refresh Multiple Reports

I love comments, write me a line