Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

"Dialog closed" event does not fire

GosforthDec 19 2020

I do exactly what is in this article https://www.foxinfotech.in/2019/10/oracle-apex-on-close-dialog-refresh-parent-page-regions.html to have dynamic action that fires even when dialog window is closed (by pressing 'x').
Dynamic action is within parent page.
But it does not work. Parent page or region does NOT refresh.
Modal I have is not created duing wizzard process - I open report as modal. Maybe this is the reason. So there are different 'modals'?

Comments

Gosforth

No way, it does not work. Bug

Gosforth

I found solution:
Apex - General - Modal Dialogs (0 Bytes)Since Dynamic Action event "Dialog Closed" does not run when the user clicks the 'X' in the upper right corner - this event is perfectly useless. I never saw user that dos not close window just clicking [x]

InoL

The x is not part of the modal page, but the parent page. That's why "it doesn't work". It's not a bug. Hopefully Oracle will do something about it indeed.

User_C1C55

Got the solution!
It will also work clicking the 'X' in the upper right corner!
you just need to add the following line to Page properties Dialog Attributes:
``close: function(event, ui) {apex.navigation.dialog.close(true,{});}``
Capture.PNG

User_HZ13L

Thank you, User_C1C55! Your solution works. I made a small change to return the Dialog Page Id, to identify the Modal window that was closed.
close: function(event, ui) {apex.navigation.dialog.close(true,{"dialogPageId":712});}
Where 712 is the hardcoded PageId of the Modal Page.
image.pngThe dialogPageId can be checked as below from the calling Page.
image.png

Cesar Berrio

Thank you very much for the explanation and examples,
An important thing in the image you have this.data.dialogPageId === "38" It does not work,
change it to: this.data.dialogPageId == "38" It works perfect!
to see ===
just in case 38 is my popup form

Sandeep Khot-Oracle

Try with Dialog Closed or Cancelled event. This works.

1 - 7

Post Details

Added on Dec 19 2020
7 comments
7,221 views