Galera,
estou usando My Faces (1.2.7), tomahawk 1.1.9.
Nesta página http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk é dito que “Tomahawk releases starting from version 1.1.7 (released September 2008 ) automatically support Facelets”.
Tenho um exemplo rodando, sem lançar exceção nenhuma, porém o menu (jscookmenu) não é renderizado quando uso facelets (funciona normalmente sem facelets).
Alguém consegue ajudar?
O que percebi vendo o código gerado é que este pedaço não é incluido na página (e no exemplo sem facelets é incluido).
[code]
[/code]
Abaixo os arquivos do projeto.
Obrigado,
Jefferson
template.xhtml
[code]<?xml version='1.0' encoding='UTF-8' ?>
Facelets - Template Example
<body>
<h1>
<ui:insert name="title">Default Title</ui:insert>
</h1>
<p>
<ui:insert name="body">Default Body</ui:insert>
</p>
</body>
[/code]
template-client.xhtml
[code]<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition template="/template.xhtml">
<ui:define name="title">
<f:view>
<h:form>
<t:inputHidden forceId="true" id="jscook_action" />
<h1><h:outputText value="JavaServer Faces - Facelets" /></h1>
<t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="css/jscookmenu">
<t:navigationMenuItems id="navitems" value="#{dynamicMenu.navItems}" />
</t:jscookMenu>
</h:form>
</f:view>
</ui:define>
<ui:define name="body">
Hello from the Facelets client template!
</ui:define>
</ui:composition>
</body>
[/code]
web.xml
[code]<?xml version="1.0" encoding="UTF-8"?>
com.sun.faces.verifyObjects
true
com.sun.faces.validateXml
true
javax.faces.DEFAULT_SUFFIX
.xhtml
facelets.DEVELOPMENT
false
facelets.SKIP_COMMENTS
true
MyFacesExtensionsFilter
org.apache.myfaces.webapp.filter.ExtensionsFilter
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
uploadMaxFileSize
20m
MyFacesExtensionsFilter
Faces Servlet
MyFacesExtensionsFilter
.jsf
MyFacesExtensionsFilter
/faces/
org.apache.myfaces.webapp.StartupServletContextListener
Faces Servlet
javax.faces.webapp.FacesServlet
1
ExceptionHandlerServlet
com.sun.errorhandler.ExceptionHandler
errorHost
localhost
errorPort
24444
ThemeServlet
com.sun.webui.theme.ThemeServlet
log4j-init
init.Log4jInit
log4j-init-file
WEB-INF/classes/log4j.properties
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ExceptionHandlerServlet</servlet-name>
<url-pattern>/error/ExceptionHandler</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ThemeServlet</servlet-name>
<url-pattern>/theme/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>forward.jsp</welcome-file>
</welcome-file-list>
[/code]
faces-config.xml
[code]<?xml version='1.0' encoding='UTF-8'?>
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>manter_usuario</from-outcome>
<to-view-id>/jsf-pages/ManterUsuarios.jsp</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>gerar_senha</from-outcome>
<to-view-id>/jsf-pages/GerarSenha.jsp</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>trocar_senha</from-outcome>
<to-view-id>/TrocarSenha.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>dynamicMenu</managed-bean-name>
<managed-bean-class>menu.DynamicMenu</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
[/code]