charlie tsai
charlie tsai

Reputation: 285

Close modal dialog page and refresh the page Oracle APEX

I am trying to close a modal dialog page after changes have been made and then refresh the edit form that was underneath the modal dialog in Oracle Apex.

I tried using dynamic action to close the dialog, but it seems that the dynamic action proceeds the processing step, resulting in the data not being saved into the database after the modal dialog has closed.

modal dialog = page edit form = page

modal dialog is a pop out on the edit form

Is there a way to close the dialog, while saving the data and also refresh the edit form?

I think there is a way to also redirect to previous page but I do not know how to do that.

Upvotes: 6

Views: 49825

Answers (2)

Thirumalai
Thirumalai

Reputation: 59

Refresh Page when Dialog is closed. Click here

this blog will give enough information about how to refresh the Page when model dialog closed (cross icon).

We can trigger a dynamic action when user press cross icon in model dialog. This will archive by pasting the following code in Model dialog property-> Dialog -> attribute:

close: function(event, ui) {apex.navigation.dialog.close(true,{dialogPageId:7});}

And one more thing we need to keep in mind that "chained property" set to Yes for page to refresh. Here 7 is model dialog page number. Above given code will trigger dialog closed event.

Upvotes: 5

Ashish Sahay
Ashish Sahay

Reputation: 96

Yes there are many ways to close the dialog box while saving the data.

  1. you can use the process for dialog close, process should be after your process which is saving data.

  2. Javascript: please refer below link

http://ashishtheapexian.blogspot.in/2017/06/refresh-region-of-base-page-when.html

https://apex.oracle.com/pls/apex/f?p=1200008:15:132444785184935::NO:RP:P15_POST_ID:142

  1. Branching : You can create a branch after processing point. this will redirect and close the dialog after saving you data to the database.

Upvotes: 5

Related Questions