I want to prevent from multiple clicking button in JSF but every attempt does not work. Action in that button is responsible for loading data to table. I have something like that:
<h:commandButton class="inputButton bFind" action="#{backingBean.load}" value="#{msgc.find}" />
but that line allows users to click that button even before action ends.
When I try to do something like that:
<a4j:commandButton class="inputButton bFind" onclick="this.disabled=true" oncomplete="this.disabled=false" action="#{backingBean.load}" value="#{msgc.find}" />
or
<a4j:commandButton class="inputButton bFind" onclick="this.disabled=true" oncomplete="this.disabled=false" action="#{backingBean.load}" value="#{msgc.find}" />
then button is blocked and its prevent from multiple clicking but then I must refresh site to see data in table. :/ I have no idea what i should do to this.