The planets application can be run here. It is defined by the following:
Java classes (Source Packages/com/corejsf/):
JSF pages (Web Pages/):
Resources (Web Pages/resources/:
Properties files (Source Packages/com/corejsf/):
Configuration files (Web Pages/WEB-INF/):
Templates files (Web Pages/)
The planets application has a welcome file (planetarium.xhtml) and a file for each of the 8 planets. They all have identical structure. They are all short due to their use of templates.
Planets Files (Web Pages/):
The planets application has five templates files.
Template Files (Web Pages/):
The templates/masterLayout.xhtml
file defines the layout
for all of the application pages.
It has 4 <ui:insert>
tags
Each one names a variant feature where individual pages may need to
provide different content.
The name
attribute provides a name that the pages use to
refer to a specific variant feature.
Some of the <ui:insert>
tags have non-empty content.
This defines the default content.
The <ui:include>
subtag is a mechanism for getting
content from another web page.
Individual pages use a <ui:composition>
tag that
references templates/masterLayout.xhtml
.
When a page needs non-default content for one of the parts they specify
the content with a <ui:define>
tag.
The name
attribute of the tag should match the
name
attribute of one of the
<ui:insert>
tags in
templates/masterLayout.xhtml
.
The files in the sections/login folder provide
<ui:composition>
tags for the titlebar and
the sidebar of the login page.
The files in the sections/planetarium folder provide
<ui:composition>
tags for the titlebar and
the sidebar of all other pages.