PDA

View Full Version : Dynamic Transition SWF 2.0.9 - Help



joshua.toepfer@gmail.com
Dec 8th, 2011, 02:03 PM
I have not been able to decifer from the documentation online what I need in order to get this working.

Spec(s):
Spring 2.5.6.SEC02
SWF 2.0.9

I am trying to employ a navigation menu which will transition between the different view-states. In some instances I need to perform logic, but if I can just get one transition to work i'd be happy.

In debugging the code, I noticed that webflow was not returning a transition (null). This causes binding and validation to take place, and in this case is not what I want (see below).



<view-state ...>

<transition on="${currentEvent.id.startsWith('menu')}" to="menuDecision" bind="false" validate="false"/>

</view-state>

<decision-state id="menuDecision">

<if test="currentEvent.id.endsWith('page1')" then="viewState1"/>

</decision-state>


references:
http://static.springsource.org/spring-webflow/docs/2.0.x/reference/htmlsingle/spring-webflow-reference.html#el-introduction

joshua.toepfer@gmail.com
Dec 8th, 2011, 04:14 PM
I guess a more concise question would be...

For SWF 2.0.9 can you have el or ognl statements in the 'on' attribute of a transition? After debugging into the SWF, I found that the expression was an OgnlExpression but it will just return the string value of "currentEvent.id.startsWith('menu')". This leads me to believe the answer is no.