Press "Enter" to skip to content

Oracle Apex – On Close Dialog Refresh Parent Page Regions

In Oracle Apex, when we create a modal dialog form with normal report, then Apex creates a dynamic action for the parent report region to refresh it when the form dialog will close. But if we are creating a report manually then we need to create it ourselves. Here in this tutorial, I will give two examples of dynamic actions, one is to refresh the parent page region on a close dialog by selection type region and another dynamic action is to refresh parent region on a close dialog based on JavaScript expression.

Below is the first example, in which we will create a dynamic action for a report region to refresh it on the close dialog. On my page, I have an interactive report region namedReport 1” and this report having a link column which is opening a dialog form.

1. Dynamic Action for a Report Region to Refresh on Close Dialog

In Oracle Apex page designer, click on the Dynamic Actions tab, then do the right-click on the Close Dialog node and select Create Dynamic Action option and set the following properties:

  • Name: da_report
  • Event: Dialog Closed
  • Selection Type: Region
  • Region: Report 1 (This is the interactive report region on my page)

True Action

  • Action: Refresh
  • Selection Type: Region
  • Region: Report 1

Save the changes and run the report and when you will close the dialog, called from the region “Report 1“, it will refresh the report region.

Now I have a button on the same page from which I am calling another dialog form and on close, I want to refresh another region having an interactive grid. To perform this task, I will create a dynamic action based on the JavaScript expression to refresh the parent region. Follow these steps:

2. Dynamic Action based on JavaScript Expression to Refresh Parent Region

In Oracle Apex page designer, click on the Dynamic Actions tab, then do the right-click on the Close Dialog node and select Create Dynamic Action option and set the following properties:

  • Name: da_selectjs
  • Event: Dialog Closed
  • Selection Type: JavaScript Expression
  • JavaScript Expression: window

The following is the screenshot for the above settings:

Oracle Apex dynamic action JavaScript expression.

True Action

  • Action: Refresh
  • Selection Type: Region
  • Region: Report 2 (This is the interactive grid region on my page)

Save the changes and run the page to test.

Related tutorials:

Vinish Kapoor

FoxInfotech.in is created, written, and maintained by Vinish Kapoor. It is built on WordPress, and hosted by Bluehost. Connect with Vinish on Facebook, Twitter, and GitHub.

You may also like: