Thursday, January 7, 2010

Elements of Navigation Rules in JSF

A navigation rule(facess-config.xml) of JSF consists of the following elements:

•<navigation-rule>*: The wrapper element for the navigation cases.

•<from-view-id>*: Contains either the complete page identifier (the context sensitive relative path to the page) or a page identifier prefix ending with the asterisk (*) wildcard character. If you use the wildcard character, the rule applies to all pages that match the wildcard pattern. To make a global rule that applies to all pages like Help Page, leave this element blank.

•<navigation-case>*: The wrapper element for each case in the navigation rule. Each case defines the different navigation paths from the same page.

•<from-action>: An optional element that limits the application of the rule only to outcomes from the specified action method. The action method is specified as an EL binding expression.

•<from-outcome>*: Contains an outcome value that is matched against values specified in the action attribute of UI components. Later you will see how the outcome value is referenced in a UI component either explicitly or dynamically through an action method return.

•<to-view-id>*: Contains the complete page identifier of the page to which the navigation is routed when the rule is implemented.

•<redirect/>: An optional element that indicates that the new view is to be requested through a redirect response instead of being rendering as the response to the current request. This element requires no value.


NOTE : * marked are mandatory elements

No comments:

Post a Comment