|
Seam provides enhancement bundled over JSF. Included in this bundle are Facelet, the template Framework for JSF, a4j AJAX framework, as well as Seams enhancements. Throughout this document, the JSF, a4j and Facelet features would mentioned with their nomenclature, whereas Seam features would imply Seam enhancements.
The steps involved in the implementation of specification capture in the content source and the page descriptor are described below.
Change the extension of the html page to active page extension
The source content that captures the initial presentation mock-up would be html/xhtml page for most platforms. For JSF based on Facelet, the source content would be xml compliant, and using the file extension of xhtml, and so would the final implementation code.
Example of file name and extension is shown below, as well as the page specification.
/pages/northStorm.xhtml
PAGE DESCRIPTOR |
id |
pages/northStorm.xhtml |
page-url |
pages/northStorm.xhtml |
template |
|
description |
|
Insertion of declaration and other necessary code segments
The required declarations that must be inserted have to do with namespaces and tag definitions. Example of this is shown below.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelet"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<div>
//.
</div>
</html>
The descriptor attribute template when populated denotes the template used by the page.
PAGE DESCRIPTOR |
id |
pages/northStorm.xhtml |
page-url |
pages/northStorm.xhtml |
template |
layout/template.xhtml |
description |
|
The typical declarations for a page using a template are shown below.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelet"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib"
template="layout/template.xhtml">
<div>
//.
</div>
</ui:composition>
There are more discussions on the use of template in the section on segment descriptor types.
|