5

In my Spring web flow app, one of my action-state transitions looks like this:

    <transition on-exception="com.foo.BarException" to="barView">
        <set name="flowScope.error" value="foo.bar" type="string" />
    </transition>

I would like to set flowScope.error to the literal String "foo.bar", but Spring interprets this as a reference to the foo object's bar attribute. How can I force Spring to take the String literally?

AndreiM
  • 4,558
  • 4
  • 36
  • 50

1 Answers1

10

I figured it out: the value needs needs to be enclosed in single quotes:

<set name="flowScope.error" value="'foo.bar'" type="string" />

AndreiM
  • 4,558
  • 4
  • 36
  • 50