如果页面刷新,请避免运行该过程
我有点混淆如何实现这一目标。
我有一个页面,该页面为交互式报告
和一个称为trucate
的按钮。
在Interactive Report
- > 选定的表
:'员工' 我选择了操作为:在按钮上提交页面
,因此单击按钮 - > 截断
- >该表被截断,交互式报告没有显示任何细节。它可以按预期工作。
现在问题是当我再次刷新页面时,pl/sql
代码可以运行!!!需要在刷新时避免这种情况,它不应
在按钮上再次执行 - >我已经设置了属性 - > 提交页面
创建了处理 - >流程 - > PL/SQL代码
pl/sql代码
declare
m_count nnumber;
begin
select count(*) into m_count from employee;
if m_count > 0 then
execute immediate 'truncate table employee';
apex_application.g_print_success_message := 'truncated table !!!';
commit;
else
null;
end if ;
exception
when others
then
apex_error.add_error(p_message => 'unable to load',p_display_location => apex_error.c_line_in_notification);
end;
需要您提供帮助
I am bit confuse how to achieve this not getting.
I have a page which as interactive report
and one button called trucate
.
In interactive report
-> selected table
: 'employee'
I Selected action as : submit page
on button
So when click on button -> truncate
-> The table gets truncated and interactive report does not show any details. It works as expected.
Now the problem is when I refresh again page the PL/SQL
code gets run !!!. Need to avoid this on refresh it should not execute again
On button -> I have set the property -> submit page
Created the processing -> process -> PL/SQL code
PL/SQL code
declare
m_count nnumber;
begin
select count(*) into m_count from employee;
if m_count > 0 then
execute immediate 'truncate table employee';
apex_application.g_print_success_message := 'truncated table !!!';
commit;
else
null;
end if ;
exception
when others
then
apex_error.add_error(p_message => 'unable to load',p_display_location => apex_error.c_line_in_notification);
end;
Need you help on this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在PL/SQL进程上设置“当按钮”的服务器侧条件。这应确保仅在单击按钮时运行。但是,在提交页面后,成功消息将成为URL的一部分。因此,当您随后重新加载页面时,将再次显示成功消息。
发生的是以下
因此,(4)之后,页面的URL是在URL本身中具有成功消息的页面URL。如果页面刷新,则该消息将再次显示。但是该过程不会重新运行(因为页面未重新提交)
Set a server side condition of "When Button Pressed" on the pl/sql process. That should ensure it only runs when the button is clicked. However, the success message will be part of the url when after the page is submitted. So when you reload the page afterwards, the success message will be shown again.
What happens is the following
So... after (4) the url of the page is the page url that has the success message in the url itself. If the page is refreshed, then the message will be shown again. But the process will not re-run (since page is not re-submitted)