- We can pass parameters to region using parameter property of the region.
- Parameter Map object is of java.util.Map
- ADF region or ADF dynamic region can use parameter map
- Parameter Map reduces number of parameters under bindings in the page def file of the jspx file where we are dropping the task flow as region.
- If there are same parameters in the binding and the map the map take the precedence
Create a bounded task flow
Added two input parameters to the bounded task flow test1 and test2. Drag and drop the task flow to the testParamMapToRegion.jspx. Code for the testParamMapToRegion.jspx is as shown below:
<?xml
version='1.0' encoding='UTF-8'?>
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page
contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document
title="testParamMapToRegion.jspx" id="d1">
<af:form id="f1">
<af:region
value="#{bindings.parameterMaptoRegion1.regionModel}"
id="r1"/>
</af:form>
</af:document>
</f:view>
</jsp:root>
Create a managed bean with pageflowScope in adfc-config.xml
package
view;
import
java.util.HashMap;
import
java.util.Map;
public
class RegionMap {
public RegionMap() {
super();
}
public Map getMyMap() {
Map map = new HashMap();
// Parameter value is set here.
// Parameter value is set here.
map.put("test1",
"test1");
map.put("test2",
"test2");
return map;
}
}
<?xml
version='1.0' encoding='UTF-8'?>
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:panelGroupLayout
id="pgl1">
<af:outputText value=" Test
=#{pageFlowScope.test1}" id="ot1"/>
<af:outputText value=" Test
=#{pageFlowScope.test2}" id="ot2"/>
</af:panelGroupLayout>
</jsp:root>
Run the testParamMapToRegion.jspx page and see the pageFlowScope parameters test1 and test2.
This blog was making more interesting. Keep adding more information on your page.
ReplyDeleteC C++ Training in Chennai
c c++ course fees in chennai
C++ Training
C Language Training
C++ programming course
C C++ Training in Anna Nagar
JMeter Training in Chennai
javascript training in chennai
ReplyDeleteI really enjoyed this article. I need more information to learn so kindly update it.
Selenium Training in Chennai
Selenium Course in Chennai
selenium certification in chennai
Best selenium Training Institute in Chennai
Selenium Training in Velachery
Selenium training in Adyar
Python Training in Chennai
Software testing training in chennai
JAVA Training in Chennai
Really informative blog, I wrote something similar on my blog, but this post didn't cover some things I covered in my post so thanks for the extra insights.
ReplyDeleteC and C++ Training Institute in chennai | C and C++ Training Institute in anna nagar | C and C++ Training Institute in omr | C and C++ Training Institute in porur | C and C++ Training Institute in tambaram | C and C++ Training Institute in velachery