【问题标题】:Spring web flow not workingSpring Web 流不起作用
【发布时间】:2016-09-13 15:02:24
【问题描述】:

我已将注销流程定义为:

<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.xsd">

<view-state id="casLogoutPopup" view="casLogoutApplicationsPopup_new"> 
    <transition on="ok" to="test" />
    <transition on="cancel" to="test2" />
</view-state>

<view-state id="test" view="casLogoutView" />
<view-state id="test2" view="casLoginView" />

这是我的 jsp 文件“casLogoutApplicationsPopup_new.jsp”,当从浏览器访问注销时显示。

<form>
    <input type="hidden" name="execution" value="${flowExecutionKey}" />
    <input class="btn_submit" type="submit" name="_eventId_ok" accesskey="o" value="OK" />
    <input class="btn_submit" type="submit" style="float: right" name="_eventId_cancel" accesskey="c" value="CANCEL"/>
</form>

问题是我无法在单击 OK/CANCEL 按钮时启动“测试”网络流程。

【问题讨论】:

  • 这可能是一个重复的问题。在stackoverflow.com/questions/11227837/…查看答案
  • 不,在那个流程中,两个转换都进入了结束状态,但在这里我什至无法捕获点击事件
  • 你没有使用 Spring form:formform:input 标签?

标签: java spring spring-webflow cas spring-webflow-2


【解决方案1】:

试试action属性中的执行url:

<form action="${flowExecutionUrl}">
    <input class="btn_submit" type="submit" name="_eventId_ok" accesskey="o" value="OK" />
    <input class="btn_submit" type="submit" style="float: right" name="_eventId_cancel" accesskey="c" value="CANCEL"/>
</form>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-14
    • 1970-01-01
    • 1970-01-01
    • 2015-04-15
    • 1970-01-01
    • 2017-12-04
    • 2015-10-29
    相关资源
    最近更新 更多