这是代码
<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的浏览器中继续存在。
答案 0 :(得分:2)
原因可能是由于错误而在中间停止脚本。使用开发人员工具(IE中的F12键),有一个脚本调试器,可以帮助进行错误跟踪。
答案 1 :(得分:2)
我有同样的问题,在我的情况下,它在所有浏览器中都运行良好,除了在IE9中ajax只被触发一次。
我正在使用render="@form"
,当我将其更改为render="@all"
时,它运行正常。我不知道为什么,因为我在该页面中只有一个表单,并且我的所有组件都是这种形式,无论如何,我希望这是有用的。