私はこのJSFボタンを持っています:
<h:commandButton style="position:absolute; bottom:12px; right:12%;" styleClass="lbimage" onclick="this.disabled=true" value=" Edit Account " rendered="#{not AccountProfileTabGeneralController.editable}" action="#{bean.editAccount(true)}" >
<f:ajax render="@form" execute="@form"></f:ajax>
</h:commandButton>
コード実行時のダブルクリックを防ぐために、この JS を追加しました。
onclick="this.disabled=true"
しかし、F5 キーを押して Web ページを更新すると、ページの読み込み時にボタンが無効になります。どうすればこれを防ぐことができますか?