Download FAQ History |  | API Search Feedback

> ## Navigation Model

> Virtually all web applications are made up of a set of pages. One of the primary concerns of a web application developer is managing the navigation between these pages.

> The new JavaServer Faces navigation model makes it easy to define page navigation and to handle any additional processing needed to choose the sequence in which pages are loaded. In many cases, no code is required to define navigation. Instead, navigation can be completely defined in the application configuration file (see section Application Configuration) using a small set of XML elements. The only situation in which you need to provide some code is if additional processing is required to determine which page to access next.

> To load the next page in a web application, the user usually clicks a button. As explained in the section Define Page Navigation, a button click generates an action event. The JavaServer Faces implementation provides a new, default action event listener to handle this event. This listener determines the outcome of the action, such as success or failure. This outcome can be defined as a string property of the component that generated the event or as the result of extra processing performed in an `Action` object associated with the component. After the outcome is determined, the listener passes it to the `NavigationHandler` instance associated with the application. Based on which outcome is returned, the `NavigationHandler` selects the appropriate page by consulting the application configuration file.

> For more information on how to perform page navigation, see section Navigating Between Pages.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.