在 Oracle Forms / OC4J 中访问 URL 参数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/112812/
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
Accessing URL parameters in Oracle Forms / OC4J
提问by Dave Smylie
How do I access parameters passed into an Oracle Form via a URL. Eg given the url:
如何访问通过 URL 传递到 Oracle 表单的参数。例如,给定网址:
http://example.com/forms90/f90servlet?config=cust&form='a_form'&p1=something&p2=else
http://example.com/forms90/f90servlet?config=cust&form='a_form' &P1 =东西与其他P2 =
This will launch the 'a_form' form, using the 'cust' configuration, but I can't work how (or even if it's possible) to access p1 (with value of 'something') p2 (with value of 'else')
这将使用“cust”配置启动“a_form”表单,但我无法访问 p1(值为“something”)p2(值为“else”)
Does anyone know how I can do this? (Or even if it is/isn't possible?
有谁知道我怎么能做到这一点?(或者即使它是/不可能的?
Thanks
谢谢
采纳答案by Tony Andrews
Within Forms you can refer to the parameters p1 an p2 as follows:
在 Forms 中,您可以参考参数 p1 和 p2,如下所示:
- :PARAMETER.p1
- :PARAMETER.p2
- :PARAMETER.p1
- :PARAMETER.p2
e.g.
例如
if :PARAMETER.p1 = 'something' then
do_something;
end if;
回答by Dave Smylie
Thanks Tony
谢谢托尼
That was one part of the problem.
这是问题的一部分。
The other needed part I eventually found on oracle.com was the url structure. After all the forms90 parameters (config etc), you need to supply an "otherparams" parameter supplying your parameters as a parameter to that. (parameters seperated by '+': eg
我最终在 oracle.com 上找到的另一个需要的部分是 url 结构。在所有 forms90 参数(配置等)之后,您需要提供一个“otherparams”参数,将您的参数作为参数提供给它。(参数以'+'分隔:例如
http://server.com/forms90/f90servlet?config=test&otherparams=param1=something+param2=else
http://server.com/forms90/f90servlet?config=test&otherparams=param1=something+param2=else
Thanks
谢谢