a4j:form functionality is similar to the standard h:form component except two additional features:

Along with a4j:htmlCommandLink, it fixes the problem of h:commandLink component that cannot be re-rendered without
re-rendering the whole form it belongs to.

It might convert all non-ajax action
components (including the third party components) to the ajaxian ones if ajaxSubmit
attribute is set to true

h:commandLink renderer generates the javascript code that is used to submit the form when the link
is clicked. However, if the h:commandLink is rendered outside of the form, for example, when
you point to it with reRender, the wrong code is generated that causes the broken functionality
when user clicks this link later. The example of problematic code is below. To fix the code,
you need to replace h:form with a4j:form and h:commandLink with a4j:htmlCommandLink.

When ajaxSubmit="true", all standard action components on this form become ajaxable. This
approach is similar to the one AjaxAnywhere framework uses. If a form works in an ajax mode,
the standard ajax attribute such as reRender, eventQueue, requestDelay can be used. The
following example shows the difference between partial and full-page refreshing.
In both cases, the regular h:commandButton is used for the form submission.

AjaxForm Demo

Form with ajaxSubmit equals true

Name:

Form with ajaxSubmit equals false

Name:

HideView Source

<ui:compositionxmlns="http://www.w3.org/1999/xhtml"xmlns:ui="http://java.sun.com/jsf/facelets"xmlns:h="http://java.sun.com/jsf/html"xmlns:f="http://java.sun.com/jsf/core"xmlns:a4j="http://richfaces.org/a4j"xmlns:rich="http://richfaces.org/rich"><styletype="text/css"> .dr-pnl-b { padding: 25px; }</style><h:panelGridcolumns="2"><rich:panel><f:facetname="header"><h:outputTextvalue="Form with ajaxSubmit equals true"/></f:facet><a4j:formajaxSubmit="true"reRender="name"><h:panelGrid><h:commandButtonvalue="Set Local Name to John (Ajax)"action="#{userBean.nameItJohn}"/><h:outputTextid="name"value="Name:#{userBean.name}"/></h:panelGrid></a4j:form></rich:panel><rich:panel><f:facetname="header"><h:outputTextvalue="Form with ajaxSubmit equals false"/></f:facet><a4j:form><h:panelGrid><h:commandButtonvalue="Set Both Name to Mark (non-Ajax)"action="#{userBean.nameItMark}"/><h:outputTextid="name"value="Name:#{userBean.name}"/></h:panelGrid></a4j:form></rich:panel></h:panelGrid></ui:composition>

<<Hide Source

Note:You should not use a4j:form ajaxSubmit="true" if it contains other ajax command components.
Also, due to the security reason, uploadFile form element cannot be convertible to
the be ajaxable.