2011-10-25 24 views
5

在我的Spring Web Flow的應用,我action-state過渡的一個看起來是這樣的:如何設置文本字符串flowScope值異常?

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

我想設置flowScope.error到文本字符串「foo.bar」,但春天將此解釋爲在一個參考foo對象的條形屬性。我如何強制Spring直接從字符串中取出字符串?

回答

9

我想通了:價值有待單引號括起來的需求:

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

相關問題