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?

1 Answer 1

10

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

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.