My commonLayout.xhtml
Code: Select all
<!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">
<h:head>
<link href="#{facesContext.externalContext.requestContextPath}/resources/css/boomup.css" rel="stylesheet" type="text/css" />
</h:head>
<body>
<f:loadBundle basename="br.com.boomup.messages" var="msg"/>
<div id="container">
<div id="header">
<ui:insert name="header" >
<ui:include src="/templates/commonHeader.xhtml"/>
</ui:insert>
</div>
<div id="vertical-menu">
<ui:insert name="vertical-menu">
<ui:include src="/templates/commonVerticalMenu.xhtml" />
</ui:insert>
</div>
<div id="main-content">
<ui:insert name="teste">
<div id="banner" style="height: 250px;">
banner
</div>
<div id="wrapper">
<div id="content">
wrapper
</div>
</div>
<div id="navigation">
navigation
</div>
<div id="extra">
extra
</div>
</ui:insert>
</div>
<div id="footer">
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
<p>Here it goes the footer</p>
</div>
</div>
</body>
</html>
commonVerticalMenu.xhtml
Code: Select all
<?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:p="http://primefaces.prime.com.tr/ui">
<h:form>
<p:menubar >
<p:menuitem value="Quem Somos" icon="ui-icon ui-icon-help" url="/public/adwords.xhtml" />
<p:menuitem value="Adwords" icon="ui-icon ui-icon-check" />
<p:menuitem value="Inteligência Digital" icon="ui-icon ui-icon-arrowthick-1-n"/>
<p:menuitem value="Clientes" icon="ui-icon ui-icon-person" />
<p:menuitem value="Contato" icon="ui-icon ui-icon-mail-closed" />
</p:menubar>
</h:form>
</html>
index.xhtml
Code: Select all
<!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="/templates/commonLayout.xhtml">
</ui:composition>
</html>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/primefaces_resource/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>flick</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
</welcome-file-list>
</web-app>