Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a literal String flowScope value on-exception?

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?

like image 351
AndreiM Avatar asked Oct 25 '11 21:10

AndreiM


1 Answers

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

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

like image 200
AndreiM Avatar answered Sep 20 '22 01:09

AndreiM