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

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

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