2013-08-25 57 views
3

有什麼辦法來處理unexisting eventIds與否春季Webflow的EVENTID參數的?無效_eventId在春季Webflow的

例如這個Webflow的

<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> 
    <view-state id="welcome"> 
     <transition on="goForward" to="nextStep"/> 
    </view-state> 
    <view-state id="nextStep"> 
     <transition on="endFlow" to="finishStep" /> 
    </view-state> 
    <end-state id="finishStep"/>  
    <global-transitions> 
     <transition on="cancel" to="finishStep"/> 
    </global-transitions> 
</flow> 

如何處理與像_eventId=unexistingAction或請求沒有_eventId PARAM PARAM請求? 這通常會產生帶有堆棧跟蹤的網頁...

no transition found on occurence of event in state of flow... 

回答

5

這是你如何處理不存在轉換:

<global-transitions> 
    <transition on-exception="org.springframework.webflow.engine.NoMatchingTransitionException" to="handlingViewState"> 
     <evaluate expression="handlingBean.handle(flowExecutionException)"></evaluate> 
    </transition> 
</global-transitions> 
+0

謝謝,解決問題 – lolotron