從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