Skip to Main Content
Mastering JavaServer Faces 2.2
book

Mastering JavaServer Faces 2.2

by Anghel Leonard
June 2014
Intermediate to advanced content levelIntermediate to advanced
578 pages
12h 2m
English
Packt Publishing
Content preview from Mastering JavaServer Faces 2.2

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9781782176466Supplemental Content