I am working on spring webflows. I have two webflows in my application, one to add a person details and one to modify the person details. Both flows are working fine. Now I would like to pass parameter(s) to my modify flow and access it, so that I can preselect some of the values based on the passed parameter. How can I achieve it for below mentioned scenarios?
- From the Add flow end state.
- From outside the flow i.e from anywhere in the application except add flow.
I figured it out. In the end it was very simple and i just had to pass the parameters in url and get the parameters that I pass using input tag in the flow.xml. Earlier i wasn't using the input tag.
Url will be something like ths
http://localhost:8080/modifyPerson?personName=xxx
Then in flow.xml personName parameter that is passed is retrieved using input tag and set to the model.
<input name="personName"/>
<view-state id="modifyBasics" view="modifyBasics" model = "person">
<on-render>
<set name="person.personName" value="personName"></set>
</on-render>
....
</view-state>