|onsubmit, onclick||On submit (just before request is fired)|
|onbeforedomupdate||Response received, but before DOM update|
|oncomplete||After DOM update|
For following example has all three events defined (onsubmit, onbeforedomupdate, oncomplete):
First you will see the message “Are you sure you want to change the country”?. You will then see “Just before DOM update”. At this point the response has come back but the DOM hasn’t been updated. Lastly, after the DOM has been updated you will see “We told you so”.
When using a4j:commandButton or a4j:commandLink, onclick attribute is used instead of onsubmit:
Complete summary of all tags and which attributes are supported:
a4j:support, a4j:poll, a4j:jsFunction