从a4j:commandLink
移植到h:commandButton
问题。JSF:JS重定向不适用于h:commandButton onclick事件
这方面的工作情况:
<a4j:commandLink event="onclick" onclick="if (!confirm('#{resourceBundle.agreement_cancel_message}')) return false;" oncomplete="window.location.href='menu?agreementId='+ agreementId;"/>
这种情况下,与h:commandButton
不起作用,当前页面刷新刚:
<h:commandButton onclick="if (!confirm('#{resourceBundle.agreement_cancel_message}')) return false;window.location.href='menu?agreementId='+ agreementId;"/>
据我所知,我不能为h:commandButton
使用oncomplete
在所有。
怎么说,因为它就像我们的项目的政策 - 降低A4J:命令*使用 – sergionni
进一步我要inoke通过的commandButton – sergionni
豆的方法,因为你改变当前这是不可能的由JS定位。 – BalusC