[JAVASERVERFACES_SPEC_PUBLIC-1142] ResourceLibraryPrefix Introduce "prefix" concept to Resource Libraries Created: 08/Nov/12  Updated: 16/Mar/13  Resolved: 16/Mar/13

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Resources
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Ed Burns Assignee: Ed Burns
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 4 days, 16 hours, 15 minutes
Time Spent: 7 hours, 45 minutes
Original Estimate: 5 days

Attachments: Text File 20121114-1622-i_spec_1142.patch     Text File 20121114-2335-i_spec_1142.patch    
Issue Links:
blocks JAVASERVERFACES-2854 After "no relative paths" resolution ... Closed
blocks JAVASERVERFACES-2511 Implement ResourceResourceLibraryCont... Closed
is related to JAVASERVERFACES_SPEC_PUBLIC-971 Multi-templating System Closed


This issue captures the reduced scope of JAVASERVERFACES_SPEC_PUBLIC-971 that we are attempting for JSF 2.2.

This is the scope advocated by Frank and Imre during our last conference
call. First, recall that we've already made it so facelets are loadable
from Resource Libraries. In fact, all facelets are now served via the
ResourceHandler.createViewResource() method.

We introduce an additional piece of metadata to the concept of a
Resource Library. Frank calls it a "resource prefix". We provide a
read/write property on the FacesContext for it. Thus, we have the
notion of the currently active resource prefix.

We modify the spec for ResourceHandler such that whenever a resource is
requested, we first check if we have one that declares it supports the
currently active resource prefix. If we do, it gets served by the
ResourceHandler. If not, we look for one without the prefix.

Care must be taken with respect to the Facelet cache.

SECTION: Considerations

I'm pretty convinced that we should go with the Reduced
Multi-Templating, but I want to get your thoughts before pulling it out
and rewriting it more simply.

While it is true that one can achieve the contract re-use of the Full
proposal with the Reduced proposal, the contract is informal, and you
really have to take the Resource Library apart to discover the contract
if you want to offer multiple Resource Library instances that look
different but have the same usage contract.

The JSF spec is already gigantic so adding a whole site management
system on top of it may not be the best choice.

Comment by Ed Burns [ 14/Nov/12 ]


Comment by Ed Burns [ 15/Nov/12 ]


Comment by Ed Burns [ 15/Nov/12 ]

Do something about this comment in ResourceHandler:

  • <p>PENDING(edburns): I think we need to put an additional check
  • in to avoid returning false hits from this method when a
  • viewResource happens to be named the same as one of the templates
  • in a resource library contract. Perhaps we could set some kind
  • of flag in the tag handler of all facelet tags that are valid for
  • using resource library contracts (maybe just ui:composition and
  • ui:decorate) and make it so the getResourceLibraryContracts part
  • of this method only takes effect if that flag is set?</p>
Generated at Thu Feb 11 03:22:34 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.