JSF - Navigation

> Procedural Languages > Java > JavaServer Faces (JSF)

2 - Referencing a Method That Performs Navigation

If your page includes a component, such as a button or a hyperlink, that causes the application to navigate to another page when the component is activated, the tag corresponding to this component must include an action attribute.

This attribute does one of the following:

  • Specifies a logical outcome String that tells the application which page to access next
  • References a managed bean method that performs some processing and returns a logical outcome String

The following example shows how to reference a navigation method:

<h:commandButton
    value="#{bundle.Submit}"
    action="#{cashier.submit}" />
Advertising

3 - Documentation / Reference