Announcement Announcement Module
Collapse
No announcement yet.
How do I update data in a Spring WebFlow Model and Pass it back to the same view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I update data in a Spring WebFlow Model and Pass it back to the same view

    How do I update data in a Spring WebFlow Model and Pass it back to the same view.

    I have a project that I am working on and if the user picks a item from a selectbox I need to go back to the server in fill in some data to the model that needs to be displayed on the view.

    You can see from my view-state that once the item is picked I setoff a transition for SelectBoxPicked and call my controller with the model but how do I return the updated model to the view?

    Can someone please tell me what to put into my java (controller) code and also in my flow.xml to make this work.

    Code:
        <view-state id="SchoolVisitReport" view="SchoolVisitReport.jsp" model="visit" >
         <transition on="submit" to="addVisit">
          <evaluate expression="flowActions.validateVisit(visit, messageContext)"/>
         </transition>
         
         <transition on="loadSchools" to="SchoolVisitReport" >
          <evaluate expression="flowActions.initializeSelectableSchools(visit)" result="flowScope.selectableSchools"/>
         </transition>
            		
         <transition on="SelectBoxPicked" to="SchoolVisitReport" >
          <evaluate expression="flowActions.fillDetails(visit)" />
         </transition>
        
        
          <transition on="cancel" to="endState" bind="false"/>
        </view-state>
Working...
X