Passing a parameter to a method call in task flow ADF/EJB

1.8k views Asked by At

Imagine the following situation. I have a bounded task flow and some functions and views:

  1. A method call which represents a function from the session bean which takes a parameter, makes some operations and returns a result. I put this parameter in the page flow scope.

  2. A view which displays the result from the function as an input text field, that can be edited - represented by a jsff page. <af:inputText value="#{bindings.name.inputValue}" ... />

  3. I have a second method call, representing again a function from the session bean. This function takes the value from the input text field and makes some operations.

The question is: How to pass the parameter from the text field in step 2 to the method call in step 3

Thank you!

1

There are 1 answers

0
Alain Ghawi On

What you should do is simply adding a setActionListener to the button in your page that is calling the method and in the setActionListener from:"#{bindings.name.inputValue}" to:"#{pageFlowScope.necessaryParameter}"

Be sure to add the #{pageFlowScope.necessaryParameter} to the list of the parameters in your task flow by clicking on Overview>Parameters>Input Parameters

After doing this you should only add the #{pageFlowScope.necessaryParameter} to your method call. Be sure that the input is autoSubmit="true"

If any problem faced don't hesitate to tell me. Hope this was helpful and have a good day