The flow XML contains these entries. view-state id="listCriteria" view="listModule"> <render-actions> <bean-action bean="custommod" method="customModLists"> <method-result name="results"/> </bean-action> </render-actions> <transition on="add" to="addModule" /> </view-state>
The method returns a arraylist containing objects . But after refreshing the page the $results gets added again i see, all entries in the database are getting added again. How do i stop this unwanted behaviour from happening.
<!-- Exposes web flows for execution at a single request URL. The id of a flow to launch should be passed in by clients using the "_flowId" request parameter: e.g. /phonebook.htm?_flowId=search --> <bean name="/sbdemo.htm" class="org.springframework.webflow.executor.mvc.Fl owController"> <property name="flowExecutor" ref="flowExecutor"/> </bean>
the text box shows the previous added values , it does not show blank.
You mean that when the add page comes up the first time it has empty text boxes, but when you go back to the page, it has text boxes filled with the last value that you entered on the page?
This is happening because you are re-using "flowScope.customModTO" - you either need to add a new state to replace "flowScope.customModTO" with a brand new instance before you go into the add page, or you can re-use the instance and just display blanks on the page every time by changing things like: