【问题标题】:Invalid _eventId in spring webflowspring webflow中的_eventId无效
【发布时间】:2013-08-28 05:31:49
【问题描述】:

有什么方法可以处理 spring webflow 中不存在的 eventIds 或缺少 eventId 参数?

例如对于这个网络流

<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 参数的请求? 这通常会产生一个带有堆栈跟踪的页面...

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

【问题讨论】:

    标签: spring spring-mvc spring-webflow-2 event-id


    【解决方案1】:

    这是处理不存在的转换的方法:

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

    【讨论】:

      猜你喜欢
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      • 2012-05-23
      • 1970-01-01
      • 1970-01-01
      • 2014-11-10
      • 2011-07-29
      • 2015-12-05
      相关资源
      最近更新 更多