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!

How to submit parent page when closing modal dialog (Button X)

sKrDec 4 2015 — edited Dec 23 2015

Hi All.

I'm using APEX 5.

I have a Page1 that contains an apex tree and when one node is clicked it opens a modal Page2 that contains a tabular form where I can update some fields for the selected node, in this page I'm able to generate many changes without closing the page, for example I can add rows, save changes, delete rows, save changes and finally close the modal Page2.

I need to refresh the content of the tree located in Page1 when the Page2 is closed, after some research I noticed that refresh dynamic action doesn't work with trees and I implemented the sample application way using branches from the modal Page2 to the Page1, this causes a submit on Page1 and the tree is refreshed.

Now, my problem occurs when the user closes the Page2 using the top right button of the page (X), because there are no branches from this button that causes a submit on the Page1, the Page2 just closes without refreshing Page1, I tried creating a dynamic action on Page1 tree region that listens for Dialog Close and perform a submit page, but it seems that it never runs.

Please give an idea on how to refresh Page1 when Page2 is closed from the (X) button.

Thanks in advance, regards.

Comments

User_D54RE

I tried creating a dynamic action on Page1 tree region that listens for Dialog Close and perform a submit page, but it seems that it never runs.

try catching the "dialog close" event in the whole page

there's already a discussion for that im just lazy to look it up for you

if i remember it correctly

just set the selector to "jQuery" then add "body"

sKr

Hi Orpheus4192

I searched for the discussion that you suggested, is this:

Unfortunately the "dialog closed" dynamic action is only catched in the parent page when the "Close Dialog" process is executed in the modal page, but when you click the (X) button this process doesn't run because the modal page is not submitted.

I'm still unable to submit the parent page when the modal page is closed using (X) button.

Thanks.

sKr

@"Patrick Wolf-Oracle"

I'm sorry for mentioning to you directly but I have seen some articles related to you and I'm not able to comment on them. For example this one: http://www.explorer-development.uk.com/creating-modal-dialog-apex-5-0/

It seems that every "modal page" example out there is closed after any change made to the information, the buttons are Save (and close), Save changes (and close), I have a tabular form and I need to preserve the modal window opened after submiting the page, in the end when the user close the modal window (using the default "Close button" "X") I want to refresh the parent page.

Is there any way to achieve this behavior?

Thanks in advance.

Best regards.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 20 2016
Added on Dec 4 2015
3 comments
2,461 views