Follow by Email

Monday, 20 May 2013

Set and Get Value from Taskflow parameter (pageFlowScope variable) from Managed Bean- ADF

Hello All

This post is about getting and setting value in taskFlow parameter using Java Code so for that we have created a application with bounded taskFlow

Let's see how to do this -

We have bounded taskflow having Input Parameter defined in it named GLBL_PARAM_TEST

Bounded Taskflow Input Parameters

and we have to set its value from managed bean.
this is very simple -see how to do that
  • Get pageFlowScope Map and put parameter 's value in it
  •         Map paramMap = RequestContext.getCurrentInstance().getPageFlowScope();
            paramMap.put("GLBL_PARAM_TEST", "Ashish"); 

  • And get Value from taskFlow parameter in managed bean

  •     public String resolvEl(String data){
                   FacesContext fc = FacesContext.getCurrentInstance();
                   Application app = fc.getApplication();
                   ExpressionFactory elFactory = app.getExpressionFactory();
                   ELContext elContext = fc.getELContext();
                   ValueExpression valueExp = elFactory.createValueExpression(elContext, data, Object.class);
                   String Message=valueExp.getValue(elContext).toString();
                   return Message;
    String param=resolvEl("#{pageFlowScope.GLBL_PARAM_TEST}");

1 comment :