jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: PRD Review and pending issues

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Tue, 15 Jan 2013 14:37:14 -0500

Hi Frank

Ok, good to know that. Thanks for take a look into this.

Thinking about this, I think a good idea could be add a method to
Resource interface to get the last modified time. If you take a look
at Resource implementation, these two methods:

public boolean userAgentNeedsUpdate(FacesContext context)
public Map<String, String> getResponseHeaders()

requires to calculate the last modified time.

DefaultFaceletFactory requires calculate the last modified time in
order to refresh the facelet, so it has sense something like this:

public Long getLastModified()

return null if no lastModified time can be returned. In the case of
load a facelet from a database this method helps to isolate the
details involved in get the lastModified time from DefaultFaceletFactory
logic related to refresh facelet instances.

Maybe this is too much, but anyway I remember this comment from
Andy Schwartz long time ago:

(in [jsr-314-open] 490-XmlViews Processing JSPX files as Facelets)

AS >> ".... I wanted to mention an alternate to the
AS >> ViewDeclarationLanguageFactory approach, though I am not
AS >> sure whether it is an improvement. In our case, we wouldn't
AS >> mind using the ResourceResolver generically across VDLs,
AS >> ie. we wouldn't mind seeing ResourceResolver promoted to
AS >> a first class/VDL-agnostic API. Our ResourceResolver
AS >> implementation is used to serve up resources from the class
AS >> path as well as from remote repositories (eg. a database).
AS >> This ability could be useful not just for Facelets, but for
AS >> arbitrary VDLs. It would be nice if we could implement this
AS >> behavior one time in a standard/portable way rather than
AS >> requiring a new solution for each VDL. ..."

What we are trying to do now in JSF 2.2, making facelets use
ResourceHandler API to load facelets is precisely that.

regards,

Leonardo Uribe

2013/1/15 Frank Caputo <frank_at_frankcaputo.de>:
> Hi Leonardo,
>
> I recently provided a patch for Mojarra to solve this problem, which Manfred merged into the trunk ( http://java.net/projects/mojarra/sources/svn/diff/trunk/jsf-ri/src/main/java/com/sun/faces/facelets/impl/DefaultFacelet.java?rev1=11384&rev2=11385 ).
>
> I'll answer more detailed tomorrow.
>
> Ciao Frank
>
> Am 15.01.2013 um 00:32 schrieb Leonardo Uribe <lu4242_at_gmail.com>:
>
>> Right now, facelets derive the path using a call to:
>>
>> new URL(from, path)
>>
>
>
>
>
>