How do I Refresh a Region or Report after a Dialog is Closed?

微信扫一扫,分享到朋友圈

How do I Refresh a Region or Report after a Dialog is Closed?

I was going to write this blog post back in December 2017, but a colleague on the APEX Development team told me it was unnecessary (because numerous examples are available in the Sample Database Application and other sample applications, and it’s even in the documentation ). Well, I received this question from an internal employee today:

“When I edit the page and update the row and save and close the modal page, existing report doesn’t refresh the page with revised value. It was working on another page, but not working on this new page (I built last week). Couldn’t find a way to refresh it as soon as I close the modal window with saved data.”

He has a report and a form in his application, and the form opens up in a modal dialog. He simply wants the report on the parent page to refresh after the modal dialog is closed. Simple, right?

For anyone well-versed in APEX, you’ll find this blog post superfluous. But for everyone else who is looking for the quick explanation, as I’ve received this question 3 times in the past couple months, here it is.

  1. On the report page, create a new Dynamic Action and enter the following attributes:
    • Nam e:
    • Even t: Dialog Closed
    • Selection Typ e: Region
    • Region:
  2. Select the True action of the Dynamic Action and enter the following attributes:
    • Action: Refresh
    • Selection Type: Region
    • Region:

That’s really all there is to it. If you have multiple regions on the parent page, you could add multiple True actions for the dynamic action. If the triggering event of the modal dialog is a button instead of a region, you could specify that as your Selection Type for the triggering event. If there are multiple regions on the page which could open the modal dialog, you could even use a jQuery Selector and reference multiple elements as your Selection Type for the triggering event.

You should get this behavior out of the box when creating an application with a report and form, or adding a report and form to your application. But if you’re manually adding components, then it’s really quite easy and straightforward to add this functionality to your APEX app.

If you install the Sample Database Application, you’ll find numerous examples of this dynamic action refresh operation after the close of a modal dialog. And it is briefly documented in this tip .

Here’s a sub-RM500 smartphone that comes with 64GB of storage

上一篇

快手像集市 每个人都充满旺盛生命力

下一篇

你也可能喜欢

How do I Refresh a Region or Report after a Dialog is Closed?

长按储存图像,分享给朋友