Java Reference
In-Depth Information
Implementing Navigation
The last thing we need to do before we can test our application is to implement
application navigation. For our application we need to create a confirmation page,
then add navigation rules to our JSP page so that the application navigates from the
input page to the confirmation page when the user submits the form.
NetBeans allows us to save some time by allowing us to graphically add navigation
rules via the NetBeans
Page Flow Editor
. To do so, we need to open
faces-config.
xml
and click on the
PageFlow
button in the toolbar above the file. In our particular
case we haven't yet created the confirmation page we wish to navigate to. This is not
a problem, since it can be created "on demand" by NetBeans by right-clicking on the
PageFlow
editor and selecting
New File
from the resulting pop-up menu.
At this point the standard
New JSP File
wizard appears. We enter
confirmation.
jsp
as the name of the new JSP. The new page is automatically created and added to
the page flow editor.
Refer to Chapter 2
Developing Web Applications with Servlets and JSPs
for
instructions on the
New JSP File
wizard.