取消按钮 Icefaces 并立即 = true
我有一个带有保存和取消按钮的表单,取消按钮有immediate=true,但它不会清除表单中提交的值。我用谷歌搜索,找到了这个页面 http://jira.icefaces.org/browse /ICE-1343;jsessionid=2996E8791051E9D6775348E6CE1BC118,它说解决方案是在取消按钮中放置一个动作侦听器,该按钮调用一个清除提交值的函数,它部分起作用,因为当我有其他标签(如面板)时不清除它们。 有什么解决办法吗?谢谢
I have a form with save and cancel buttons, cancel button has immediate=true but it doesn't clear the submitted values in the form. I google it and I found this page http://jira.icefaces.org/browse/ICE-1343;jsessionid=2996E8791051E9D6775348E6CE1BC118, it says that the solution is to put an action listener in the cancel button that calls a function that clear the submitted values, it works partially because when I have other tags like panels it doesn't clear them.
Any solution? thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看此处提供的解决方案: http://www.icefaces.org/JForum/ posts/list/13807.page
除了两个最明显的解决方案之外,我个人还没有找到一个好的解决方案:手动遍历 UI 组件并取消它们
Check out the solution presented here : http://www.icefaces.org/JForum/posts/list/13807.page
I personally haven't found a good solution beside the two most obvious ones : manually traverse the UI components and nullify them
我们使用了
partialSubmit="true"
,但没有将立即属性设置为 true。这在Icefaces
1.8.2 中有效,但有一个缺点。如果验证失败一次,则将一直执行。对于
Icefaces 2.x
,建议的方法是使用singleSubmit="true"
,但我还没有尝试过。We used
partialSubmit="true"
without setting the immediate attribute to true. This works inIcefaces
1.8.2, but there is one drawback. If the validation failed once, it will be executed always.With
Icefaces 2.x
, the suggested way is to usesingleSubmit="true"
, but I haven't tried it.我在取消时使用immediate="true" 和partialSubmit="true" 以及类似的actionListener
I use immediate="true" and partialSubmit="true" on cancel and something like this for actionListener