如何使用Oracle Apex中的分支重定向到不同页面?
我定义了返回URL的函数(重定向)。
预先渲染 - 在标题之前 - 分支机构
使用以下脚本:
declare
x number:=1;
myurl varchar2(255);
begin
if v('AGENCY') = 'R-AG' then
x := 3;
myurl := 'f?p=&APP_ID.:3:&SESSION.'; ---page 3
else
x := 50;
myurl := 'f?p=&APP_ID.:50:&SESSION.'; --- page 50
end if;
return myurl;
end;
我已经定义了项目应用程序
- 名称:代理
- 范围:应用程序
- 会话状态保护:无限制
我已经定义了应用程序计算/strong>
序列:10
计算项目:代理
计算点:
之后身份验证计算类型:sql query(返回单值)
计算:
选择ROL 来自用户;
,但出于某种原因,该分支仅将第3页作为优先级,而“否则”在情况下并未实现为第50页。
I have defined a function returning a URL(redirect).
Page 1: Home-
Pre-Rendering-
Before Header-
Branches
With the following script:
declare
x number:=1;
myurl varchar2(255);
begin
if v('AGENCY') = 'R-AG' then
x := 3;
myurl := 'f?p=&APP_ID.:3:&SESSION.'; ---page 3
else
x := 50;
myurl := 'f?p=&APP_ID.:50:&SESSION.'; --- page 50
end if;
return myurl;
end;
I have defined item applications
- Name : AGENCY
- Scope : Application
- Session State Protection: Unrestricted
I have defined an application computation
Sequence :10
Computation Item: AGENCY
Computacion Point: After
Authentication Computacion Type: SQL Query(return single value)
Computacion:
SELECT ROL
FROM USERS;
But for some reason the branch only took page 3 as priority and "else" is not fulfilled to redirect to page 50 when it is the case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的计算看起来像是应该具有过滤器的东西 - 从没有过滤器的“用户”中返回了多少行?
尽管如果有任何问题,我会认为P50将是结果。
您也可以更声明地做到这一点。如在IN时,在项目代理= R-AG时拥有第3页的分支,而在没有条件的情况下,第二个分支到P50。
您的第一个分支到P3也可能只有一个查询返回行,例如
Your computation looks like something that should have a filter - how many rows return from a select from 'users' with no filter?
Though if there were any issues from that, I would have thought p50 would be the result.
You could also do this more declaratively. As in, have a branch to page 3 when item AGENCY = R-AG, and a second branch to p50 with no condition.
You first branch to p3 could also have just a query returning rows, such as