开发者

Why my spring webflow can't forward or backward?

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="publi开发者_如何学Gosh" 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.


Do you have a form tag around the buttons?

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

Maybe validation errors which are not shown?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜