简体   繁体   English

将模态对话框关闭到另一个模态对话框中

[英]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. “关闭对话框”事件将不起作用,因为第二个模态对话框不是第一个模态对话框中的iframe,它实际上将第一个对话框替换为源页面中iframe的src。

I have a dual modal-dialog element in my app, but I use it in a source->1->2->source. 我的应用程序中有一个双模态对话框元素,但我在源 - > 1-> 2->源中使用它。 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, 否则,最好将对话框1更改为从交互式报告链接的常规页面,

or alternatively - have both grids on the same page, the right starting as disabled, and use a button to enable it 或者 - 将两个网格放在同一页面上,右边开始为禁用,并使用按钮启用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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