O'Reilly logo

Mastering JavaServer Faces 2.2 by Anghel Leonard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating input fields with AJAX after validation error

Updating input fields with AJAX after validation error is a very old, well-known, and annoying issue for JSF developers. When an AJAX request fails in the validation phase, there is no built-in way to update the input fields with some valid values because JSF does not allow access to the model value after a validation error (usually, you want to clear up those fields or provide some default values, or even some old values provided by the same user). Of course, JSF developers found different workarounds, or used other libraries, such as PrimeFaces or OmniFaces, but a JSF solution was required.

Starting with JSF 2.2, all components that should be re-rendered (components indicated in the render ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required