I have the following problem:
In a page there's a button that after it is pressed should call the oncomplete javascript code.
<a4j:commandButton id="generatePDF" action="#{handler.generateResult}" value="Test PDF" oncomplete="alert('bla bla'); disableAllButtons();" reRender="msgs, checkboxes">
public String generarteResult() { ... FacesContext context = getFacesContext(); context.getExternalContext().redirect("PDFViewServlet"); return null; }