Java Reference
In-Depth Information
See Also
“Referencing a Method That Performs Navigation” in The Java EE 6
Tutorial: Basic Concepts explains how to use a component tag's ac-
tion attribute to point to an action method. “Writing a Method to
Handle Navigation” in The Java EE 6 Tutorial: Basic Concepts ex-
plains how to write an action method.
Implicit Navigation Rules
JavaServer Faces technology supports implicit navigation rules for Facelets applications.
Implicit navigation applies when navigation-rules are not configured in the applic-
ation configuration resource files.
When you add a component such as a commandButton in a page, and assign another
page as the value for its action property, the default navigation handler will try to match
a suitable page within the application implicitly.
<h:commandButton value="submit" action="response">
In the above example, the default navigation handler will try to locate a page named re-
sponse.xhtml within the application and navigate to it.
Registering a Custom Renderer with a Render Kit
When the application developer creates a custom renderer, as described in “ Delegating
Rendering to a Renderer on page 114 , you must register it using the appropriate render
kit. Because the image map application implements an HTML image map, the
AreaRenderer and MapRenderer classes in the Duke's Bookstore case study should
be registered using the HTML render kit.
You register the renderer either by using the @FacesRenderer annotation, as described
in “ Creating the Renderer Class on page 115 , or by using the render-kit element
of the application configuration resource file. Here is a hypothetical configuration of
AreaRenderer :
Click here to view code image
<render-kit>
<renderer>
<component-family>Area</component-family>
<renderer-type>DemoArea</renderer-type>
<renderer-class>
Search WWH ::




Custom Search