dgashby
May 29th, 2010, 04:35 PM
Hi,
I've been trying to get the following scenario working without much success.
From view-state 'test' on transition 'actionTest' I want to perform some checks which will determine whether we stay on view-state 'test' and simply refresh the result fragment or move on to the 'test_end' view-state.
Here's the flow setup I'm using:
<view-state id="test" >
<transition on="actionTest" to="test_decide"/>
</view-state>
<action-state id="test_decide" >
<evaluate expression="testFlowHandler.decide()" />
<transition on="refresh">
<render fragments="testForm:resultFragment"/>
</transition>
<transition on="finished" to="test_end"/>
</action-state>
<view-state id="test_end" />
Here's the view for the 'test' view-state:
<h:form id="testForm">
<h:panelGroup id="resultPanel">
<ui:fragment id="resultFragment">
<p>Result: <h:outputText id="result" value=" #{testFlowHandler.result}"/></p>
</ui:fragment>
</h:panelGroup>
<sf:commandLink id="linkTest" action="actionTest" value="Test" />
</h:form>
The testFlowHandler.decide() method is hardwired to return 'refresh' at the moment and with webflow debug turned on I can see that webflow is executing the render action and updating attributes to include the testForm:resultFragment. However the view does not refresh.
Using Firebug to trace the network flow, upon triggering the actionTest transition, I see a POST request return with a 200 response, but with no response body or spring-redirect-url in the response header. This explains why I'm not seeing the view refresh, but it doesn't solve my problem.
Am I trying to do something that's not possible? Or am I missing some other piece of puzzle?
Thanks,
Dean
I've been trying to get the following scenario working without much success.
From view-state 'test' on transition 'actionTest' I want to perform some checks which will determine whether we stay on view-state 'test' and simply refresh the result fragment or move on to the 'test_end' view-state.
Here's the flow setup I'm using:
<view-state id="test" >
<transition on="actionTest" to="test_decide"/>
</view-state>
<action-state id="test_decide" >
<evaluate expression="testFlowHandler.decide()" />
<transition on="refresh">
<render fragments="testForm:resultFragment"/>
</transition>
<transition on="finished" to="test_end"/>
</action-state>
<view-state id="test_end" />
Here's the view for the 'test' view-state:
<h:form id="testForm">
<h:panelGroup id="resultPanel">
<ui:fragment id="resultFragment">
<p>Result: <h:outputText id="result" value=" #{testFlowHandler.result}"/></p>
</ui:fragment>
</h:panelGroup>
<sf:commandLink id="linkTest" action="actionTest" value="Test" />
</h:form>
The testFlowHandler.decide() method is hardwired to return 'refresh' at the moment and with webflow debug turned on I can see that webflow is executing the render action and updating attributes to include the testForm:resultFragment. However the view does not refresh.
Using Firebug to trace the network flow, upon triggering the actionTest transition, I see a POST request return with a 200 response, but with no response body or spring-redirect-url in the response header. This explains why I'm not seeing the view refresh, but it doesn't solve my problem.
Am I trying to do something that's not possible? Or am I missing some other piece of puzzle?
Thanks,
Dean