The planets application can be run here. It illustrates the following:
In JSF you can use facelet tags to define layout templates that divide the window area into panes. These templates can be used in all JSF pages for a uniform appearance. All JSF pages that use the facelet tags must incorporate them into a namespace by adding the following attribute to the <html> tag:
xmlns:ui="http://java.sun.com/jsf/facelets"
For the planets web application,
There are three common size units that can be used in layout:
The login.xhtml page is the first page displayed. Its content pane displays the login form. Its sidebar pane just displays a single planet image.
After clicking on the login button the planetarium.xhtml page is displayed. Its content pane invites the viewer to select a planet. Its sidebar pane displays the images of the planets. These images are custom tags that navigate to the planet pages.
After clicking on a planet image, the corresponding planet page is displayed. Its content pane gives a brief description of the planet. Its sidebar pane is the same as for planetarium.xhtml.
These JSF pages are all based on the masterLayout.xhtml template file that defines the following variable parts.
The login.xhtml overrides the defaults for each of these parts. The remaining files only override the windowTitle and content parts.
The definition of display strings values is typical.
Although the application is not internationalized, it could be so with additional properties files named to reflect different locales.