Posts

Showing posts from January, 2013

Spring Webflow - Multiple evaluate statements in Action State

When executing mutiple expression statements in an action state you might encounter this exception org.springframework.webflow.engine.NoMatchingTransitionException: No transition was matched on the event(s) signaled by the [X] action(s) that executed in this action state This exception occurs because none of the evaluate statements trigger the transition. From the docs to trigger a transition a Action method has to return one of the following values A java.lang.String value A java.lang.Boolean value A java.lang.Enum value any other type success <action-state>    <evaluate expression="bean.setName('mark')"/>    <evaluate expression="bean.setAddress('Ireland')"/>    <transition to="myView"/> </action-state> So in our case our evaluate statements are not returning any of the event ids that will trigger a transition so we need to add the attribute element that will be set when the evaluate ...

Accessing message properties in spring webflow

Spring Webflow Version: 3.0.5-RELEASE Problem: We needed to set different messages on the one screen depending on a type of object. Instead of using JSTL in the jsp file we decided to set the message in the flow xml file. To access and set a message in flowscope in webflow use the following snippet. <set name="flowScope.message" value="resourceBundle['some.view.message.header']" />