跳过命令按钮上的表单验证
我有一个 JSF 页面,其中包含一个树形表单标记,该标记根据某些 bean 属性呈现。有下一页和上一页两个按钮。我想跳过转到上一页的按钮上的表单验证。
我尝试了以下方法来禁用验证:
Set
h:commandButtonimmediate="true"
- < p>通过
a4j:commandButton ajaxSingle="true" rerender="someparts"
更改按钮
它不起作用。当我想跳过验证时,为什么导航会失败?
I have a JSF page that includes a tree form tag which is rendered depending on some bean property. There are two buttons for next and previous page. I want to skip form validation on the button which goes to the previous page.
I tried the following ways to disable the validation:
Set
h:commandButton immediate="true"
Change button by
a4j:commandButton ajaxSingle="true" rerender="someparts"
It does not work. Why does the navigation fail when I want to skip validation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
immediate="true"
确实会跳过验证。确保您已成功重新部署,并且没有任何错误。immediate="true"
does skip the validation. Make sure you have redeployed successfully, and the there aren't any errors.我使用
a4j:commandButton ajaxSingle="true" reRender=":outhercomponent:formconteningcomponent:component"
reRender
解决问题,即使组件 id 唯一,也需要组件的绝对路径I solve problem using
a4j:commandButton ajaxSingle="true" reRender=":outhercomponent:formconteningcomponent:component"
reRender
needs absolute path to component even if component id unique