How Do I Implement parameterMaps for ADF Regions and Dynamic Regions?
Posted
by david.giammona
on Oracle Blogs
See other posts from Oracle Blogs
or by david.giammona
Published on Mon, 22 Mar 2010 15:20:34 -0800
Indexed on
2010/03/23
0:21 UTC
Read the original article
Hit count: 654
parameterMap objects defined by managed beans can help reduce the number of child <parameter> elements listed under an ADF region or dynamic region page definition task flow binding. But more importantly, the parameterMap approach also allows greater flexibility in determining what input parameters are passed to an ADF region or dynamic region. This can be especially helpful when using dynamic regions where each task flow utilized can provide an entirely different set of input parameters.
The parameterMap is specified within an ADF region or dynamic region page definition task flow binding as shown below:
<taskFlow id="checkoutflow1"
taskFlowId="/WEB-INF/checkout-flow.xml#checkout-flow"
activation="deferred"
xmlns="http://xmlns.oracle.com/adf/controller/binding"
parametersMap="#{pageFlowScope.userInfoBean.parameterMap}"/>
The parameter map object must implement the java.util.Map interface. The keys it specifies match the names of input parameters defined by the task flows utilized within the task flow binding. An example parameterMap object class is shown below:
import java.util.HashMap;
import java.util.Map;
public class UserInfoBean {
private Map<String, Object> parameterMap = new HashMap<String, Object>();
public Map getParameterMap() {
parameterMap.put("isLoggedIn", getSecurity().isAuthenticated());
parameterMap.put("principalName", getSecurity().getPrincipalName());
return parameterMap;
}
© Oracle Blogs or respective owner