No, there isn't a smarter way in the common case. This is the way to do it. Perhaps you wouldYou will have to set type="button" ondo the button.following
- set
type="button"on the button. - set the action on the
<a4j:support>rather than on the button istself.
In this particular case (a button) a shortcut will be:
<a4j:commandButton value="Submit" action="#{actions.submitToDB}" reRender="Button0" /> If using JSF 2.0, you can do it with <f:ajax event="onclick" render="Button0" />, which has exactly the same semantics.