gpt4 book ai didi

java - Spring Web Flow...如何仅在一次转换上停止表单验证

转载 作者:行者123 更新时间:2023-12-01 16:33:44 27 4
gpt4 key购买 nike

Spring Web Flow...如何仅在一次转换时停止表单验证。

如何仅在一次转换时停止表单验证。使用以下代码,我打开了表单验证,一切正常,但如果用户单击“取消”,我不想运行表单验证。无论如何?

<view-state id="helloworld" view="input.jsp" model="customer" popup="true">
<transition on="submit" to="preview" />
<transition on="cancel" to="thanks"/>
</view-state>

最佳答案

转换能够定义是否需要绑定(bind)和验证,只需将它们设置为 false 即可。

<view-state id="helloworld" view="input.jsp" model="customer" popup="true">
<transition on="submit" to="preview" />
<transition on="cancel" to="thanks" validate="false" bind="false"/>
</view-state>

关于java - Spring Web Flow...如何仅在一次转换上停止表单验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11650919/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com