为什么我的 spring webflow 无法前进或后退?

发布于 2024-10-20 00:53:27 字数 1580 浏览 2 评论 0原文

我正在使用 spring mvc 3.0.4 和 webflow 2.2.1,我配置我的 webflow 如下:

<view-state id="createTaskDetail" model="task" view="task/createTaskDetail">
    <transition on="upload"  to="uploadFile" />
    <transition on="revise"  to="createTaskBasic" />
    <transition on="publish" to="publish" />
    <transition on="cancel"  to="cancel" />
</view-state>

<view-state id="uploadFile" model="task" view="task/uploadFile">
    <transition on="confirm" to="createTaskConfirm" >
        <evaluate expression="task.processFile()"/>
    </transition>
    <transition on="revise" to="createTaskDetail" />
    <transition on="publish" to="publish" />
    <transition on="cancel" to="cancel" />
</view-state>

<view-state id="createTaskConfirm" model="task"
    view="task/createTaskConfirm">
    <transition on="publish" to="publish" />
    <transition on="revise" to="uploadFile" />
    <transition on="cancel" to="cancel" />
</view-state>

createTaskDetail 是我的第二个视图,当我到达此页面时,我无法前进或后退(当单击下一步按钮或返回或取消时) 。没有js错误或java异常,这是我的第二个视图的jsp代码:

                <button type="submit" id="upload" name="_eventId_upload">next</button>
                <button type="submit" name="_eventId_revise" >return</button>
                <button type="submit" name="_eventId_cancel" >cancel</button>
                <button type="submit" name="_eventId_publish" >publish</button>

有人有想法吗?谢谢。

I am using spring mvc 3.0.4 and webflow 2.2.1, I config my webflow like the following:

<view-state id="createTaskDetail" model="task" view="task/createTaskDetail">
    <transition on="upload"  to="uploadFile" />
    <transition on="revise"  to="createTaskBasic" />
    <transition on="publish" to="publish" />
    <transition on="cancel"  to="cancel" />
</view-state>

<view-state id="uploadFile" model="task" view="task/uploadFile">
    <transition on="confirm" to="createTaskConfirm" >
        <evaluate expression="task.processFile()"/>
    </transition>
    <transition on="revise" to="createTaskDetail" />
    <transition on="publish" to="publish" />
    <transition on="cancel" to="cancel" />
</view-state>

<view-state id="createTaskConfirm" model="task"
    view="task/createTaskConfirm">
    <transition on="publish" to="publish" />
    <transition on="revise" to="uploadFile" />
    <transition on="cancel" to="cancel" />
</view-state>

createTaskDetail is my 2nd view, when I arrived this page I can't forward or backward(When clicking button next or return or cancel). There is no js error or java exception,here is my jsp code of 2nd view:

                <button type="submit" id="upload" name="_eventId_upload">next</button>
                <button type="submit" name="_eventId_revise" >return</button>
                <button type="submit" name="_eventId_cancel" >cancel</button>
                <button type="submit" name="_eventId_publish" >publish</button>

Anyone has an idea? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

追星践月 2024-10-27 00:53:27

按钮周围有表单标签吗?

<form:form modelAttribute="task">
   inputs
   buttons ...
</form:form>

也许没有显示验证错误?

Do you have a form tag around the buttons?

<form:form modelAttribute="task">
   inputs
   buttons ...
</form:form>

Maybe validation errors which are not shown?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文