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.

Close Dialog event

Brad ChrissFeb 16 2022

I have a page containing an IR, and LOV and a button. The IR has a column with a link to a dialog page to view individual record. The button opens a separate dialog. The page also has a DA that will refresh the report and LOV once a dialog closes.
Once I close the dialog (triggered from the column link) the IR and LOV will refresh. However, when I close a dialog (triggered from the button), the IR and LOV will not refresh.
The DA, I have the IR as a the triggering element. The true action has nothing for the affective element and runs a JS code apex.event.trigger(jQuery id, 'apexrefresh') for both the IR and LOV
Does the apexafterclosedialog event trigger after any dialog closes or just one dialog?
Would I need more than one DA to trigger the refresh?

Comments

It seems like issue with event scope, your button may not be part of the same region as LOV and report.

John Snyders-Oracle

The apexafterclosedialog is an APEX specific event that is triggered when any APEX modal dialog page closes (not cancels). This typically means when it is closed from an Apply or OK button.
The element in the parent page that the event is triggered on depends on what opened the dialog. That is why I prefer to listen for apexafterclosedialog on the body (or in some cases you need to listen on document).
To refresh a region or item you can use the built-in action Refresh. This is better than using apex.event.trigger(jQuery id, 'apexrefresh').

1 - 2

Post Details

Added on Feb 16 2022
2 comments
1,176 views