O'Reilly logo

JavaServer Faces by Hans Bergsten

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

Name

<navigation-rule>

Synopsis

The <navigation-rule> element declares a navigation rule for the default navigation handler.

Syntax

<navigation-rule>
  [<description [xml:lang="lang"]>description</description>]*
  [<display-name [xml:lang="lang"]>displayName</display-name>]*
  [<icon [xml:lang="lang"]>
     [<small-icon>iconPath</small-icon>]
     [<large-icon>iconPath</large-icon>]
   </icon>]*
  [<from-view-id>viewId</from-view-id>]
  [<navigation-case>
    [<description [xml:lang="lang"]>description</description>]*
    [<display-name [xml:lang="lang"]>displayName</display-name>]*
    [<icon [xml:lang="lang"]>
       [<small-icon>iconPath</small-icon>]
       [<large-icon>iconPath</large-icon>]
     </icon>]*
    [<from-action>actionBinding</from-action>]
    [<from-outcome>outcome</from-outcome>]
    <to-view-id>viewId</to-view-id>
    [<redirect/>]
   </navigation-case>]*
</navigation-rule>

The optional <from-view-id> element limits the rule to the specified view ID or all views with IDs matching a pattern, for instance “/myViews/*”, where the asterisk matches any characters. One or more <navigation-case> elements declares which view to select (the <to-view-id> element) depending on the action method (the <from-action> element) and/or the action method’s outcome (the <from-outcome> element):

<navigation-rule> <from-view-id>/myView.jsp</from-view-id> <navigation-case> <from-action>#{myBean.myActionMethod}</from-action> <from-outcome>success</from-outcome> <to-view-id>/myOtherView.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> ...

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