garpinc2
Jul 14th, 2005, 01:09 PM
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE webflow PUBLIC "-//SPRING//DTD WEBFLOW//EN"
"http://www.springframework.org/dtd/spring-webflow.dtd">
<webflow id="contactUs" start-state="bindAndValidate">
<action-state id="bindAndValidate">
<action bean="contactUs.InjectionAction"/>
<transition on="success" to="pre.select.topic.action"/>
<transition on="error" to="error"/>
</action-state>
<action-state id="pre.select.topic.action">
<action bean="contactUs.PreAction" method="populateTopicValueList"/>
<transition on="success" to="pre.topic.details.action"/>
<transition on="error" to="error"/>
</action-state>
<action-state id="pre.topic.details.action">
<action bean="contactUs.PreAction" method="populateTopicDetailsValueList"/>
<transition on="success" to="select.topic.view"/>
<transition on="error" to="error"/>
</action-state>
<view-state id="select.topic.view" view="contactUs.Select.Topic.view">
<transition on="submit" to="bindAndValidate"/>
</view-state>
<end-state id="error" view="error.view"/>
</webflow>
It appears this code fires for both render and processAction.
This is what I want.
1) I want it to run this flow when I first go to the page
2) I want it to run this flow when I click on a button of the portlet
3) If flow has executed already (through clicking button) I wouldn't want code to run again in render phase.
How can I accomplish this?
<!DOCTYPE webflow PUBLIC "-//SPRING//DTD WEBFLOW//EN"
"http://www.springframework.org/dtd/spring-webflow.dtd">
<webflow id="contactUs" start-state="bindAndValidate">
<action-state id="bindAndValidate">
<action bean="contactUs.InjectionAction"/>
<transition on="success" to="pre.select.topic.action"/>
<transition on="error" to="error"/>
</action-state>
<action-state id="pre.select.topic.action">
<action bean="contactUs.PreAction" method="populateTopicValueList"/>
<transition on="success" to="pre.topic.details.action"/>
<transition on="error" to="error"/>
</action-state>
<action-state id="pre.topic.details.action">
<action bean="contactUs.PreAction" method="populateTopicDetailsValueList"/>
<transition on="success" to="select.topic.view"/>
<transition on="error" to="error"/>
</action-state>
<view-state id="select.topic.view" view="contactUs.Select.Topic.view">
<transition on="submit" to="bindAndValidate"/>
</view-state>
<end-state id="error" view="error.view"/>
</webflow>
It appears this code fires for both render and processAction.
This is what I want.
1) I want it to run this flow when I first go to the page
2) I want it to run this flow when I click on a button of the portlet
3) If flow has executed already (through clicking button) I wouldn't want code to run again in render phase.
How can I accomplish this?