关闭模态对话框页面并刷新页面 Oracle APEX
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44687041/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Close modal dialog page and refresh the page Oracle APEX
提问by charlie tsai
I am trying to close a modal dialog page after changes have been made and then refresh the edit form that was underneath the modal dialog in Oracle Apex.
我试图在进行更改后关闭模态对话框页面,然后刷新 Oracle Apex 中模态对话框下方的编辑表单。
I tried using dynamic action to close the dialog, but it seems that the dynamic action proceeds the processing step, resulting in the data not being saved into the database after the modal dialog has closed.
我尝试使用动态操作关闭对话框,但似乎动态操作继续处理步骤,导致模式对话框关闭后数据没有保存到数据库中。
modal dialog = page edit form = page
模态对话框 = 页面编辑表单 = 页面
modal dialog is a pop out on the edit form
模态对话框是编辑表单上的弹出窗口
Is there a way to close the dialog, while saving the data and also refresh the edit form?
有没有办法关闭对话框,同时保存数据并刷新编辑表单?
I think there is a way to also redirect to previous page but I do not know how to do that.
我认为有一种方法也可以重定向到上一页,但我不知道该怎么做。
回答by Ashish Sahay
Yes there are many ways to close the dialog box while saving the data.
是的,有很多方法可以在保存数据时关闭对话框。
you can use the process for dialog close, process should be after your process which is saving data.
Javascript: please refer below link
您可以使用对话框关闭进程,进程应该在您保存数据的进程之后。
Javascript:请参考以下链接
http://ashishtheapexian.blogspot.in/2017/06/refresh-region-of-base-page-when.html
http://ashishtheapexian.blogspot.in/2017/06/refresh-region-of-base-page-when.html
https://apex.oracle.com/pls/apex/f?p=1200008:15:132444785184935::NO:RP:P15_POST_ID:142
https://apex.oracle.com/pls/apex/f?p=1200008:15:132444785184935::NO:RP:P15_POST_ID:142
- Branching : You can create a branch after processing point. this will redirect and close the dialog after saving you data to the database.
- 分支:您可以在处理点后创建分支。这将在将数据保存到数据库后重定向并关闭对话框。
回答by Thirumalai
Refresh Page when Dialog is closed. Click here
this blog will give enough information about how to refresh the Page when model dialog closed (cross icon).
此博客将提供有关如何在模型对话框关闭时刷新页面(十字图标)的足够信息。
We can trigger a dynamic action when user press cross icon in model dialog. This will archive by pasting the following code in Model dialog property-> Dialog -> attribute:
当用户在模型对话框中按下十字图标时,我们可以触发一个动态动作。这将通过在模型对话框属性-> 对话框-> 属性中粘贴以下代码来存档:
close: function(event, ui) {apex.navigation.dialog.close(true,{dialogPageId:7});}
And one more thing we need to keep in mind that "chained property" set to Yes for page to refresh. Here 7 is model dialog page number. Above given code will trigger dialog closed event.
还有一件事我们需要记住,“chained property”设置为 Yes 以刷新页面。这里 7 是模型对话框页码。上面给出的代码将触发对话框关闭事件。
Hope this will help.
希望这会有所帮助。