f:ajax 在 IE 中仅触发一次
这是代码
<h:outputLink styleClass="button" value="javascript:void(0);">
Text
<f:ajax execute="@form" event="click" listener="#{commentView.saveComment}" render="main_form" />
</h:outputLink>
我的 commentView bean 是@ViewScoped。
正如我所期望的,在 Chrome 中工作,但在 IE 中只工作一次。
谢谢你的任何想法。
编辑:
通过将 render="main_form"
更改为 render=":main_form"
,它的行为好像没问题,
但问题在 Eclipse 的浏览器中仍然存在。
Here is code
<h:outputLink styleClass="button" value="javascript:void(0);">
Text
<f:ajax execute="@form" event="click" listener="#{commentView.saveComment}" render="main_form" />
</h:outputLink>
My commentView bean is @ViewScoped.
Works in Chrome as i expected but in IE only once.
Thanks for any idea.
EDIT:
it behaves like it is ok by changing render="main_form"
to render=":main_form"
but the problem continues in eclipse's browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
原因可能是由于错误而在中间停止脚本。使用开发工具(IE 中的 F12 键),有脚本调试器可以帮助进行错误跟踪。
Reason may be stopping script in the middle because of error. Use Developer Tools (F12 key in IE), there is script debugger that can help with bug tracking.
我遇到了同样的问题,就我而言,它在所有浏览器中都工作正常,除了在 IE9 中 ajax 仅被触发一次。
我正在使用
render="@form"
,当我将其更改为render="@all"
时,它工作得很好。我不知道为什么,因为我在该页面中只有一个表单,并且我的所有组件都是该表单,无论如何,我希望这有用。I had the same problem, in my case it worked fine in all browsers except that in IE9 the ajax was fired only once .
I was using
render="@form"
and when I changed it torender="@all"
, it worked fine. I dunno why, since I only have one Form in that page, and all my components are in that form, anyway, I hope this is useful.