I have 2 buttons:
<a4j:commandButton
execute="@this"
value="clear"
immediate="true"
render=":thisForm :anotherForm"
action="#{myMB.clearFields}" />
<a4j:commandButton
value="execute"
type="submit"
action="#{myMB.executeAction}"
render=":anotherForm" />
And both are generating inputs with type="submit". But I would like the key to execute the second button. Is there a way to change the type for the first button?
<a4j:commandButton
type="button" .../>
on the first button should do the trick.
type - Type of button to create. Can be one of "submit", "button", "image" and "reset". If not specified, the default value is "submit".
Refer to component reference for more details.