PDA

View Full Version : Running action twice in Sun Portal.What should I look for.



garpinc2
Jul 14th, 2005, 01:09 PM
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE webflow PUBLIC "-//SPRING//DTD WEBFLOW//EN"
"http&#58;//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?

garpinc2
Jul 14th, 2005, 09:54 PM
Seems Sun One portal is losing PortletSSession from request to request. Has anyone seen this? Are there any work arounds?