Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 774
charlie tsai Avatar asked Jun 21 '17 22:06

charlie tsai


2 Answers

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.
like image 156
Ashish Sahay Avatar answered Oct 05 '22 00:10

Ashish Sahay


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.

like image 44
Thirumalai Avatar answered Oct 05 '22 00:10

Thirumalai