This query is about passing a flow-scope variable from one view-state to other view-state in spring-webflow.
Below code is a flow.xml file. 1. I have 2 view states in this file('firstView', 'secondView'). 2. Here start-state is a view-state 'firstView', and on start I am setting a variable 'customizeBean' in flowscope. 3. In 'firstView' view-state a transition 'selectUsers' is defined, which calls another view-state 'secondView'. 4. I want to access flow-scope variable 'customizeBean' in second view state 'secondView', basically I want to access 'customizeBean' on 'twinPickers.xhtml' page. 5.Please let me know how can I pass 'customizeBean' from first view state to second view-state.
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
start-state="firstView" parent="reportStandard" >
<on-start>
<set name="flowScope.customizeBean" value="customizeBean" />
</on-start>
<view-state id="firstView" view="customizeReport.xhtml">
<transition on="selectUsers" to="secondView" />
</view-state>
<view-state id="secondView"
view="/WEB-INF/twinPickers.xhtml">
<on-entry>
<evaluate expression="reportAction.createTwinPicker" />
</on-entry>
</view-state>
<bean-import resource="customizeReport-bean.xml" />
</flow>