I have a little problem because i need to download a file (and for that i only can with h:commandButton) but i needed the oncomplete function (that only works with a4j:commandButton) to appear a Running Status. The sample of the code is this:
<h:commandButton
id="downloadReportButton"
action="#{reportingBean.createAndDonwloadFile()}"
/>
I already try to do it like in this response by BalusC: https://stackoverflow.com/a/31267418/1777424 but the problem is because of Ajax requests are not perform.
<h:commandButton
id="downloadReportButton"
action="#{reportingBean.createAndDonwloadFile()}"/>
<f:ajax onevent="oneventFunction" />
</h:commandLink>
function oneventFunction(data) {
if (data.status === "success") {
oncompleteFunction();
}
}