2. Apply template
1. To setup seam 3 + richfaces 4 check
Building example application seam 3 + richfaces 4
2. add template.xhtml on WebContent directory
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<h:head>
</h:head>
<h:body>
<ui:insert name="content"/>
</h:body>
</f:view>
</html>
3. add index_with_template.xhtml on WebContent directory
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
template="template.xhtml">
<ui:define name="content">
<h1>Seam 3 template test</h1>
<rich:panel header="Richfaces running on JBoss AS 6">
<ul>
<li>RichFaces is a component library for JSF and an advanced framework</li>
<li>for easily integrating AJAX capabilities into business applications.</li>
</ul>
</rich:panel>
</ui:define>
</ui:composition>
4. deploy it onto Jboss 6
5. http://localhost:8080/seam3-test/index_with_template.xhtml
No comments:
Post a Comment