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

commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated

Introduction Whenever an UICommand component (<h:commandXxx>, <p:commandXxx>, etc) fails to invoke the associated action method, or an UIInput component (<h:inputXxx>, <p:inputXxxx>, etc) fails to process the submitted values and/or update the model values, and you aren’t seeing any googlable exceptions and/or warnings in the server log, also not when you configure an ajax exception handler … Read more