f:ajax 在 IE 中仅触发一次

发布于 2025-01-04 15:59:15 字数 542 浏览 1 评论 0原文

这是代码

 <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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情域 2025-01-11 15:59:15

原因可能是由于错误而在中间停止脚本。使用开发工具(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.

简美 2025-01-11 15:59:15

我遇到了同样的问题,就我而言,它在所有浏览器中都工作正常,除了在 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 to render="@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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文