Implementing the Template Page
Before we implement each individual view, we need to implement the template page, which will be used
by all the views in the samples in this chapter. Listing 18-6 shows the template page (/WEB-
INF/layouts/standard.xhtml).
Listing 18-6. The Template Page
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view contentType="text/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JSF 2, Spring Web Flow, and PrimeFaces</title>
<link rel="stylesheet"
href="${request.contextPath}/app/resources/styles/blueprint/screen.css" type="text/css"
media="screen, projection" />
<link rel="stylesheet"
href="${request.contextPath}/app/resources/styles/blueprint/print.css" type="text/css"
media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" href="${request.servletPath}/styles/blueprint/ie.css"
type="text/css" media="screen, projection" />
<![endif]-->
</h:head>
<h:body>
<div class="container">
<div>
<h1>JSF 2, PrimeFaces, and Spring Web Flow</h1>
<h3 class="alt">
<ui:insert name="title"/>
</h3>
<hr/>
</div>
<div>
<ui:insert name="content"/>
</div>
</div>
</h:body>
</f:view>
</html>
In Listing 18-6, the layout of the template page is quite simple. In JSF, there are three main tag
libraries: h-namespace, f-namespace, and ui-namespace:
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home