Facelets templates not work correctly in Richfaces 3.3.3?
bumblew84 May 6, 2010 5:08 PMHi, I'm new in the community
I'm using RichFaces 3.3.3 with JSF 2.0, exactly as the documentation says. With Facelets outside JSF, with the jsf-facelets library.
My problem is that Facelets templeates are refreshed completly with each navigation rule is executed after each action, ie not only repainted the page with the tag inserted ui:insert, but repaint all pages included in the template.
I have no this problem with ICEfaces Facelets.
I would like to know if this is a bug of RichFaces or may be a configuration problem, someone has this happened?
the source code is as follows:
web.xml
...
<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><context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
...
plantilla-principal.xhtml
...
<body>
<div>
<ui:include src="../common/sistema/ZonaLogoCliente.xhtml" />
</div>
<div>
<ui:include src="../common/sistema/Cabecera.xhtml" />
</div>
<div>
<ui:include src="../common/sistema/Zona0.xhtml" />
</div>
<div>
<ui:include src="../common/sistema/Zona1.xhtml" />
</div>
<div>
<ui:insert name="cuerpoSistema" />
</div>
<div>
<ui:include src="../common/sistema/Menu.xhtml" />
</div>
<div>
<ui:include src="../common/sistema/Pie.xhtml" />
</div><body>
...
EstructuraListarEmpleados.xhtml
...
<ui:composition
template="../../../template/plantilla-principal.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:define name="cuerpoSistema">
<ui:include src="../ListarEmpleados.xhtml" />
</ui:define>
</ui:composition>...
"ListarEmpleados.xhtml" is shown correctly, but the repainting of all pages included in the template is very obvious.
I have the suspicion that the problem may be the html tag "body" in "plantilla-principal", instead it should use "h: body" supported by JSF 2.0, but not by RichFaces 3.3.3 apparently. This is fixed with version 4 may be??
Excuse my English, I am very Argentine ...
Any comment will Thanked ...