简体   繁体   中英

Closing Modal Dialog into another Modal Dialog

So here's a curious example I'm working on.

The layout is basically like this. I have a main page that contains an Interactive Report with a link column that opens a Modal Dialog page with two Interactive Grid s to edit some info.

Due to how the tables are linked, information has to be first saved on the left Grid before one can add and save data on the right Grid. I'm attempting to circumvent that by having a second Modal Dialog (called by a custom button in the left Grid), so there's no chance that the right Grid can be tampered with, before the information is saved in this new Modal Dialog page.

It does work, in a way. I can insert the new data into its table when I save it on the dialog page and I come back to the first dialog page.

The problem now is that I can't seem to refresh the region from the left Grid. If I add a button (for testing) that refreshes the left Grid, it works. But if I try through "Close/Cancel Dialog" dynamic actions, it doesn't work at all.

I have tried the following so far:

First method:
*On 2nd Modal Page (the one with Data to be saved for the left Grid)*

    Type: Close Dialog
    Point: Processing
    When Button Pressed: Cancel

*On 1st Modal Page (with the left and right Grids)*

    When - Event: Dialog Closed
    Selection Type: Region
    Region: Left Grid

With the following True Action:

    Action: Refresh
    Selection Type: Region
    Region: Left Grid

Nothing happens in this case.


Second method: Using a branch to go back to the previous Modal Page.

*Branch (on the 2nd Modal Page)*

    Point: After Processing
    Page: The previous modal page
    When button pressed: None (So that either cancel or save trigger it)

It results in the data saving AND I manage to open the previous modal page, with the left Grid being updated, but it's shown as if it was chained, looking smaller than it should normally be.

I have the first method already applied (and working) between the first page (with the interactive report) and the second on (with the first modal dialog). Is there any way to make this interaction work? I can't find any example online about anyone having tried multiple levels of modal dialogs so I have no idea if it's even possible.

The "Close Dialog" event will not work, because the second modal dialog is not an iframe inside the first modal dialog, its actually replacing the first dialog as the src of the iframe in the source page.

I have a dual modal-dialog element in my app, but I use it in a source->1->2->source. if you don't need the link from the second dialog back to the first, I suggest trying a one-way schema. otherwise, it's probably best to either change dialog 1 into a regular page linked from the interactive report,

or alternatively - have both grids on the same page, the right starting as disabled, and use a button to enable it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM