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

Mixing AJAX and flow scope

AJAX requests are usually associated with beans in view scope (@ViewScoped), which means that data can be persisted (stored) over multiple AJAX requests as long as the current view is not destroyed by a navigation case (or other causes). A flow is defined as a collection of logical related pages/views; therefore AJAX cannot survive across flow transitions.

For better understanding, we will adapt the application developed in Chapter 3, JSF Scopes – Lifespan and Use in Managed Beans Communication (the ch3_7_3 application, which you need to be familiar with) to support AJAX requests in the registration.xhtml view (the first page in flow). The main idea is to write a view scoped bean that may populate the player name and ...

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