Pessoal vou pedir uma dica aqui para montar meu template, estou tendo dificuldades com isso. Gostaria que vcs pudessem me dar um toq sobre o meu exemplo.
Tenho 4 arquivos xhtml que se resumem em: menu.xhtml, topo.xhtml, rodape.xhtml e template.xhtml. Eu consegui montar todo meu template, mas no momento de chamar ele no index não to sabando montar. Segue um exemplo com meu topo.
Este arquivo topo.xhtml o conteúdo de topo:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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">
<body>
<ui:insert name="topo">
<td height="169" colspan="2">
<img src="../images/topbanner.gif" width="755" height="155" />
</td>
</ui:insert>
</body>
</html>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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">
<head>
<title><ui:insert>.::Projeto Base::.</ui:insert></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="keywords" content="Keywords here"/>
<meta name="description" content="Description here"/>
<meta name="Author" content="Joseph De Araujo"/>
<meta name="Publisher" content="MyFreeTemplates.com"/>
<meta name="robots" content="index, follow"/>
<meta name="revisit-after" content="30 days"/>
<meta name="distribution" content="global"/>
<meta name="rating" content="general"/>
<meta name="content-language" content="english"/>
<script language="JavaScript" type="text/JavaScript"
src="../images/myfreetemplates.js"></script>
<style type="text/css">
.basestyle {
color: #FFFFFF;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
h1 {
font-size: 16px;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
body,td,p,input {
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #333333;
}
.navlinks {
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
}
</style>
</head>
<body style="margin: 0;">
<table width="759" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#d80000">
<tr align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#d80000">
<ui:include src="topo.xhtml" />
</tr>
<ui:include src="menu.xhtml" />
<ui:include src="rodape.xhtml" />
</table>
</body>
</html>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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">
<ui:composition template="template/template.xhtml">
<ui:define name="topo">
</ui:define>
<ui:define name="menu"></ui:define>
<ui:define name="rodape"></ui:define>
</ui:composition>
</html>
Qual é a forma correta de fazer, e o que está errado?
Grato!
