tell me more icon JSF Navigation Diagrams, Rules and Cases

By default, JDeveloper opens a new faces-config.xml file as a blank JSF navigation diagram, which you will use to define the navigation between the pages of your application.

JSF navigation diagrammer and Component Palette

Note: To open the JSF navigation diagrammer at any other time, in the Application Navigator double-click the JSF configuration file, faces-config.xml, then in the editor window, select the Diagram tab.

Navigation by a user through a JSF application is defined using navigation rules that determine which page is displayed next when the user clicks a link or button. Using a JSF navigation diagram you can plan out the pages in your JSF application and can define the navigation rules for users to navigate between the pages. You draw on the JSF navigation diagram using the JSF navigation diagrammer tools and appropriate items from the Component Palette.

Typically, a number of different links from one page are defined in one navigation rule. The different cases, such as the different links on the page, are defined as the navigation cases for that rule. In the example, you will add three pages on the JSF navigation diagram, and then define the page navigation by creating two navigation cases (in one navigation rule) to represent the two possible ways of navigating from one of the pages to the other two pages.

JSF navigation diagram

In JDeveloper, there are two ways to draw the page navigation on the JSF navigation diagram:

  • If you have already created the JSF pages, drag them from the Application Navigator and drop them on the diagram.
  • If you have not created the JSF pages, select the jsf page icon JSF Page element from the Components panel of the JSF Diagram Objects page in the Component Palette and drop the element on the diagram to create one page representation.

In either case, after you have added the pages on the diagram, you add the page navigation rules by selecting the navigation case icon JSF Navigation Case element from the Component Palette, and then selecting the pages on the diagram for which the navigation rule will be applied.

When you draw navigation rules on a JSF navigation diagram, two things happen:

  • The required navigation rules and cases are added to the faces-config.xml file automatically for you.
  • The different cases for each rule are shown on the diagram as arrows connecting pages, with the direction of the arrow indicating the pages from which and to which the user will navigate. A label is associated with each case, to be used to distinguish the different cases from a single page.

The following is an example JSF navigation diagram showing two JSF pages linked by arrows representing the navigation rules between them:

JSF navigation diagram showing pages and navigation rules

Each navigation rule in a JSF configuration file defines what the destination should be for one or more links from a single page. For each different link on that page, you need a separate case of the rule, that is, a navigation case.

As an example, a page that has two buttons on it would use one navigation rule with two cases. On a JSF navigation diagram, this situation might look similar to the following:

JSF navigation diagram as described in the text

Copyright © 1997, 2009, Oracle. All rights reserved.

false ,,,,,,,,,,,,,,,