I have tried different solutions but what I want to achivie is:
When you press the button (a tag / h:commandlink ) I want to disable the button or do no action at the second click because the first one is loading. Right now I have a issue that you can double click on the button and it can give me error.
I have this code:
<h:commandLink id="btn" styleClass="link"
onclick="test()"
action="#{use.enterAgentMode(user, myBean.guardEnum)}">
</h:commandLink>
for example is it possible to create a variable and set it to true/false and set condition inside of action=... if true do the code else nothing
I also tried with JQuery and document.getElement to set attr.disabled true but did not work. I saw it disabled with inspect but it was still clickable
I have tried different stuff, tried to add some debounce on the button.. any advices please