While upgrading a large project from Mojarra 2.1.13 to 2.1.28, we noticed that all action and actionEvent methods on h:commandButton in a page where being called for every ajax request that executed the form. We were able to narrow down the problem to commandButton with type="button". These were working fine in 2.1.13, but after the upgrade, a click of one button triggers the actions of all others.
Below is the code used to recreate the issue:
<h:form id="form">
<h:commandButton type="button" value="Action1" action="#{page1.action1}">
<f:ajax execute="@form" render="@form" />
</h:commandButton>
<h:commandButton type="button" value="Action2" action="#{page1.action2}">
<f:ajax execute="@form" render="@form" />
</h:commandButton>
<h:commandButton type="button" value="Action3" action="#{page1.action3}">
<f:ajax execute="@form" render="@form" />
</h:commandButton>
</h:form>
Note that this does not happen when the button type is not set or is set to "submit. It looks like this behavior was introduced with Mojarra 2.1.14.
Has anyone seen this before? Are there any considerations for removing the type="button" from these buttons, especially in regards to the request lifecycle (i.e - validation)?
JAVASERVERFACES-3351 filed and addressed