The a4j:commandButton combines the standard h:commandButton with our own a4j:ajax. This not only reduces typing, but also inherits all a4j:ajax special options.
<!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:outputStylesheet> .outhello { font-weight: bold; word-break: break-all; } </h:outputStylesheet> <h:form id="form"> <h:panelGrid columns="3"> <h:outputText value="Name:" /> <h:inputText value="#{userBean.name}" /> <a4j:commandButton value="Say Hello" render="out" execute="@form" /> </h:panelGrid> </h:form> <br /> <a4j:outputPanel id="out"> <h:outputText value="Hello #{userBean.name} !" rendered="#{not empty userBean.name}" styleClass="outhello" /> </a4j:outputPanel> </ui:composition>