webtier@glassfish.java.net

Custom FaceletFactory

From: <forums_at_java.net>
Date: Thu, 1 Nov 2012 09:37:21 -0500 (CDT)

Hi, Our application uses a customized FaceletFactory which so that we can
integrate with a CMIS based content repository. This was painful at JSF 1.2
but I was encouraged at JSF 2 that you can specify your own FaceletFactory
via com.sun.faces.faceletFactory context parameter. The behaviour employed is
identical to DefaultFaceletFactory apart from 1) The path can correspond to
URL pointing to a resource located within the WAR file or held on the CMIS
content repository (i.e. it may be overridden). 2) The refresh period is
fixed at -1 meaning that a facelet is never refreshed via the URL object. 3)
The resolution to a URL is cached as in DefaultFaceletFactory
(relativeLocations) but that cached can be invalidated (in response to a CMIS
content repository upload). The refresh period is set to -1 for performance
reasons. Invalidating the relativeLocations concurrent map means that we get
‘liveness’. But some things (even in 2.1.14) are painful 1)
DefaultFaceletFactory is declared final. 2) The member variable cache of
DefaultFaceletFactory has type FaceletCache 3) DefaultFacelet only has
package visibility. I am avoiding a custom URL handler (since it you run into
all sorts of class loader problems) Am I missing something? Peter.

--
[Message sent by forum member 'peterheywood']
View Post: http://forums.java.net/node/891912