How to do double-click prevention in JSF

If you’re using solely ajax requests, you could use jsf.ajax.addOnEvent handler of the JSF JavaScript API for this. The below example will apply on all buttons of type=”submit”. function handleDisableButton(data) { if (data.source.type != “submit”) { return; } switch (data.status) { case “begin”: data.source.disabled = true; break; case “complete”: data.source.disabled = false; break; } } … Read more

Pure Java/JSF implementation for double submit prevention

I am looking for generic mechanism to avoid form re-submission when the page is refreshed For that there are at least 2 solutions which can not be combined: Perform a redirect after synchronous post. This way the refresh would only re-execute the redirected GET request instead of the initial request. Disadvantage: you can’t make use … Read more

tech