Chapter 7. JSF and AJAX
JSF and AJAX have been a great team for a long time. The potential of this combination has been heavily exploited by many JSF extensions (Ajax4Jsf, OmniFaces, PrimeFaces, RichFaces, ICEfaces, and so on) that provide many AJAX built-in components, extend AJAX default capabilities, increase AJAX security and reliability, and add more control to developers who need to manipulate the bowels of AJAX mechanism.
By default, JSF contains a JavaScript library that encapsulates AJAX methods for dealing with AJAX requests or responses. This library can be loaded in the following two ways:
- Using the
<f:ajax>
tag, the built-in AJAX library is loaded implicitly. - Using
jsf.ajax.request()
, the AJAX library is loaded explicitly and developers have access to AJAX code. This approach is commonly used when the default AJAX behavior must be altered. It should be performed only by developers with high expertise, because modifying the default AJAX behavior may lead to undesirable...