h:commandButton/h:commandLink does not work on first click, works only on second click
You can use the following script to fix the Mojarra 2.0/2.1/2.2 bug (note: this doesn’t manifest in MyFaces). This script will create the javax.faces.ViewState hidden field for forms which did not retrieve any view state after ajax update. jsf.ajax.addOnEvent(function(data) { if (data.status == “success”) { fixViewState(data.responseXML); } }); function fixViewState(responseXML) { var viewState = getViewState(responseXML); … Read more