How to re-execute javascript function after form reRender?

Simplest way is to just put the JS function call in the to-be-updated component itself. <h:form> … <h:commandButton value=”submit”><f:ajax render=”@form” /></h:commandButton> <h:outputScript>someFunction();</h:outputScript> </h:form> This way it’s executed as the page loads and also if the form get updated by ajax. As to the <f:ajax> itself, you could also use its onevent attribute. <f:ajax … onevent=”handleAjax” … Read more