How to give my 2nd sub-flow access to display data from customer model.
I have a HelloWorld Example that has one flow that has two sub-flows (input-flow, save-flow). In the input-flow my user enters data and confirms it... on the save-flow I would just like to display that data from the customer model from the input-flow.. How do I give access to save-flow to have the customer model from the input-flow??
HelloWorld-Flow.xml
input-flow.xmlCode:<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"> <subflow-state id="input" subflow="helloworld/input"> <transition on="customerReady" to="save" /> </subflow-state> <subflow-state id="save" subflow="helloworld/save"> <transition on="customerDone" to="thankYou" /> </subflow-state> <view-state id="thankYou"> <transition to="endState" /> </view-state> <!-- End state --> <end-state id="endState" /> <global-transitions> <transition on="cancel" to="endState" /> </global-transitions> </flow>
save-flow.xmlCode:<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"> <var name="customer" class="org.uftwf.domain.Customer"/> <view-state id="input" model="customer" popup="true"> <transition on="submit" to="preview" /> <transition on="cancel" to="thanks" validate="false"/> </view-state> <view-state id="preview" model="customer"> <transition on="cancel" to="input"/> <transition on="accept" to="customerReady"> <evaluate expression="hellowWorldFlowActions.addCustomer(customer)"/> </transition> </view-state> <end-state id="customerReady" /> </flow>
Code:<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"> <view-state id="save"> <transition on="customerDone" to="customerDone"/> </view-state> <end-state id="customerDone" /> </flow>


Reply With Quote
