oracle APEX:登录到带有参数的页面后重定向
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5117050/
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
APEX: Redirect after login to a page with arguments
提问by macwadu
this in the normal login proccess page
这在正常的登录过程页面中
wwv_flow_custom_auth_std.login(
P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1'
);
wwv_flow_custom_auth_std.login(
P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1'
);
that redirects to page 1, my problem is that i want to redirect to page 1 but i want to pass some values like CURRENT_NODE_ID,P1_ID width zero like the example above
重定向到第 1 页,我的问题是我想重定向到第 1 页,但我想传递一些值,例如 CURRENT_NODE_ID,P1_ID 宽度为零,如上面的示例
f?p=104:1:708914681153727:::CIR:CURRENT_NODE_ID,P1_ID:0,0
f?p=104:1:708914681153727:::CIR:CURRENT_NODE_ID,P1_ID:0,0
is this possible to do in wwv_flow_custom_auth_std.login function? or is there a way to do this?
这可以在 wwv_flow_custom_auth_std.login 函数中完成吗?或者有没有办法做到这一点?
Thanks
谢谢
回答by Jeffrey Kemp
You don't need to pass the values via the URL. You can modify the authentication scheme to set those values when a user logs in. For example:
您不需要通过 URL 传递值。您可以修改身份验证方案以在用户登录时设置这些值。例如:
In your chosen Authentication Scheme, set Post-Authentication Processto:
在您选择的身份验证方案中,将Post-Authentication Process设置为:
APEX_UTIL.SET_SESSION_STATE('CURRENT_NODE_ID', 0);
APEX_UTIL.SET_SESSION_STATE('P1_ID', 0);
I generally do this in a database procedure and place a call to it in the Authentication Scheme - which is why I'm using APEX_UTIL.SET_SESSION_STATE. I haven't tried it but this might also work in this field:
我通常在数据库过程中执行此操作,并在身份验证方案中调用它 - 这就是我使用 APEX_UTIL.SET_SESSION_STATE 的原因。我还没有尝试过,但这可能也适用于该领域:
:CURRENT_NODE_ID := 0;
:P1_ID := 0;
EDIT
编辑
To modify your Authentication Scheme (these instructions are for Apex 4, but they should be much the same for earlier versions):
要修改您的身份验证方案(这些说明适用于 Apex 4,但对于早期版本应该大致相同):
- Go to the Application Builder
- Open the application you wish to modify
- Go to Shared Components
- Select Authentication Schemes
- Open the current Authentication Scheme
- Scroll down to Login Processing
- Place your code in the Post-Authentication Process
- 转到应用程序生成器
- 打开您要修改的应用程序
- 转到共享组件
- 选择身份验证方案
- 打开当前的认证方案
- 向下滚动到登录处理
- 将您的代码置于认证后流程中