We also add the<a4j:support>
tag as a child of each input component tag to add Ajax capabilities to the standard JSF components. We indicate that the onblur
event of the component should trigger an Ajax request that will submit the form and re-render the component that fired the event. The effect of this technique is that invalid fields will be instantly highlighted when the user tabs through the fields in the form.
We also set the ajaxSingle
attribute to true to indicate that Ajax4jsf should only include the active component in the Ajax request when it submits the JSF form on the onblur
event. This is an important technique for Ajax performance optimization as it limits the volume of form data that is sent to the server on each Ajax request, sending only the data that is necessary to validate the active component. This technique will be covered in more detail in the next chapter.
<s:validateAll> <h:panelGrid columns="2">...