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.
Read now
Unlock full access