On Tue, Apr 6, 2010 at 10:25 PM, Leonardo Uribe <lu4242(a)gmail.com> wrote:
Hi
Checking this issue on myfaces:
https://issues.apache.org/jira/browse/MYFACES-2628
It was notice there is a way to override the default ResourceResolver, used
to load facelets templates, but the algorithm related to ViewHandler (spec
pdf section 7.5.2) says that if the physical resource exists with the name
requestViewId let that value be viewId, otherwise return null. So, if some
user try to load templates from other sources, the ViewHandler just will not
work.
The problem is there is no standard way to retrieve the current
ResourceResolver object, so the ViewHandler just can't find them. In
myfaces, this one is instantiated on facelets vdl object, when it is
initialized.
One idea to solve this one could be expose this object through vdl
interface (maybe a public method called getResourceResolver()?).
Since this issue is related to other ones that requires expose facelets api
objects, I'll not create an issue on the spec jira, but if it is necessary I
can create it.
I've thought for a while that the ResourceResolver should be pluggable like
everything else. For JSF 2.x, ideally it'd be tied into the resource
resolution mechanism -- there's no reason for it to be separate. I'm not
sure what the best short-term solution is, however, since this in effect
breaks backwards compatibility with Facelets.
regards,
Leonardo Uribe