JSF provides four internal navigation tags for navigation within a JSF application. They differ with respect to appearance and with regard to the type of HTTP request that they use.
When these tags are activated, a POST request sends the form data back to the server:
<h:commandButton>
renders as a button;
<h:commandLink>
renders as a link
When these tags are activated, a GET request sends the form data back to the server:
<h:button>
renders as a button;
<h:link>
renders as a link
All of the above tags must be within the scope of an
<h:form>
tag to initiate navigation on the server.
In addition, there is a JSF navigation tag for navigation without data submission.
<outputLink>
navigate without submitting data
The images in the "Button Images" menu item shows variations in the use
of the <h:commandButton>
and
<h:button>
tags.
The images in the "Link Images" menu item shows variations in the use of
the <h:commandLink>
and <h:link>
tags.
The images in the "Output Link Images" menu items show variations in the
use of the <h:outputLink>
tag.
The index.xhtml
page in the flags example
demonstrates use of the h:commandLink tag.
This example shows how the h:commandLink tag can be used to turn
an image into a button.
The same thing could be done with a h:link tag.