-
1. Re: fire clicking on a4j:commandbutton
nbelaevski Feb 26, 2010 4:21 AM (in response to ajanz)Hi Sascha,
ignoreDupResponses is a client-side optimization feature, it cannot prevent calling server methods. You can disable a4j:commandButton on click and make it enabled in oncomplete.
-
2. Re: fire clicking on a4j:commandbutton
harut Mar 5, 2010 6:46 AM (in response to ajanz)Hi,
You can show some "loading" message when the button clicked till it's action will complete.
E.g.
<a4j:commandButton id="cleanButton"
value="#{bundle['mytask.search.clean']}"
actionListener="#{searchTaskController.onCleanSearchRequested}"
reRender="searchPart"
onclick="Richfaces.showModalPanel('ajaxLoadingBarId')"
oncomplete="Richfaces.hideModalPanel('ajaxLoadingBarId')"/>Where modalPanel is:
<rich:modalPanel id="ajaxLoadingBarId"
autosized="false"
resizeable="false"
width="200"
height="50"
style="border:#000000; border-width:0px; border-style:hidden; background:transparent;"
shadowDepth="-500000"
showWhenRendered="false">
<h:graphicImage value="/loading.gif" alt="loading"/>
</rich:modalPanel>Use any "Loading image" in the above modalPanel.
You can add mentioned 2 javascript rows in any rich/a4j component which sends ajax request.
onclick="Richfaces.showModalPanel('ajaxLoadingBarId')"
oncomplete="Richfaces.hideModalPanel('ajaxLoadingBarId')"In case of <a4j:support/> use onsubmit insteadof onclick...
Regards, Harut.
-
3. Re: fire clicking on a4j:commandbutton
ilya_shaikovsky Mar 5, 2010 7:32 AM (in response to harut)or just disable the button on onclick and enable on oncomplete.