为什么我的弹簧webflow不能前进或后退?

时间:2011-03-04 09:08:50

标签: spring spring-mvc spring-webflow

我正在使用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>

有人有想法吗?感谢。

1 个答案:

答案 0 :(得分:0)

按钮周围是否有表格标签?

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

可能是未显示的验证错误?