在Jdeveloper 11gR2中传递url参数到由task flow构成的区中
1、建立环境。
新建fusion web application-->PassVar
在默认任务流 adf-config.xml里面创建view welcome和相应的jsf页面。
新建bounded任务流passVar.xml
在任务栏中添加view test和相应的jsf页面。在ViewController工程中添加html测试页面go.html
上面步骤完成后,你的程序看起来应该是这样。
2、流程。
2.1
首先,在go.html里面加入HyperLink,并附加url参数.这里一定要注意,如果welcome页面属于任务流中的一个view,那么在url中的引用方法是/faces/welcome而不是/faces/welcom.jsf。
选择任务流adf-config.xml中welcome view的-->Page Parameters
增加如下参数
添加完后welcome view会有错误指示,忽略之。
以上2.1内容也可直接在代码中,将参数放入requestScope中,代码如下:
ADFContextadfContext = ADFContext.getCurrent();
MaprequestScope = adfContext.getRequestScope();
requestScope.put("test", test);
2.2
在任务流passVar.xml中test view相应位置添加如下参数。
在test.jsff中添加一个button控件,并设置控件属性Text为#{pageFlowScope.test}
3、结果
拖动passVar任务流到welcome页中,创建区。
运行go.html
你将看到按钮文字正是通过url传递过来的文字。