Here is the order of the actions, which will be done by clicking on p:commandButton:
- User clicks button
- onclick is fired
- Ajax request is prepared based on process
- onstart is fired
- Ajax request is sent
- actionListener is fired
- action is fired
- Ajax response is prepared based on update
- Ajax response is returned
- if HTTP response status is 200, onsuccess is fired
- if HTTP response status is 500, onerror is fired
- update is performed based on ajax response
- oncomplete is fired