oracle apex从pl/sql代码重定向到模式对话框页面 [英] oracle apex redirect to modal dialoge page from pl/sql code

查看:389
本文介绍了oracle apex从pl/sql代码重定向到模式对话框页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的顶点页面中有一个页面处理.页面处理完成后,我想重定向到模式对话框页面.所以我写了代码

I have a page process in my apex page. I want to redirect to a modal dialoge page after the page process finishes. So I wrote the code

htp.init;
owa_util.redirect_url('f?p=&APP_ID.:34:APP_SESSION.::NO:34:P34_CODE,P34_DAY_DATE:P30_CODE.,'||:P30_DAY_DT); 
apex_application.stop_apex_engine;

页面34是模式对话框页面.因此显示错误

The page 34 is a modal dialoge page . Hence it shows error

第34页无法成功渲染.确保在第34页上使用的页面模板的模板类型为对话框页面",并定义了适当的JavaScript对话框初始化,对话框关闭和对话框取消代码.

page 34 cannot be rendered successfully. Ensure the page template in use on page 34 is of template type "Dialog page", with appropriate JavaScript dialog initialization, dialog closure and dialog cancel code defined.

然后我尝试了

 l_url:=APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:34:APP_SESSION.::NO::P34_CODE,P34_DAY_DATE:P30_CODE.,'||:P30_DAY_DT',p_checksum_type=>'SESSION'); 
 htp.init;
 apex_util.redirect_url(l_url);
 apex_application.stop_apex_engine;  

那对我也不起作用.有人有解决办法吗?

That too didn't worked for me. Anybody have solution?

推荐答案

为按钮创建一个动态操作,在页面处理中复制pl/sql代码,然后在动态操作中添加一个执行pl/sql代码"操作.将复制的代码粘贴到此处.

create a dynamic action for the button, copy the pl/sql code in page process and then add an action "execute pl/sql code" in dynamic action.Paste the copied code there.

declare
   v_url varchar2(4000);
begin

   v_url:=apex_util.prepare_url
                  (p_url             =>  'f?p=&APP_ID.:34:&SESSION.:::34:P34_CODE:'|| :P30_CNAME,
                   p_triggering_element      =>'$(''#URLS'')'
                  );
   :p30_URL:=v_url;
end;

在此pl/sql之后,为相同的动态操作创建一个javascript操作并编写

after this pl/sql, create a javascript action for the same dynamic action and write

 eval($('#P30_URL').val());

eval()是默认的js方法.它将重定向到模式页面

eval() is a default js method.This will redirect to modal page

这篇关于oracle apex从pl/sql代码重定向到模式对话框页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆