javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-1142

ResourceLibraryPrefix Introduce "prefix" concept to Resource Libraries

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Resources
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Snapshot.

          Show
          Ed Burns added a comment - Snapshot.
          Hide
          Ed Burns added a comment -

          snapshot

          Show
          Ed Burns added a comment - snapshot
          Hide
          Ed Burns added a comment -

          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>
          Show
          Ed Burns added a comment - 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>

            People

            • Assignee:
              Ed Burns
              Reporter:
              Ed Burns
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 days
                5d
                Remaining:
                Time Spent - 7 hours, 45 minutes Remaining Estimate - 4 days, 16 hours, 15 minutes
                4d 16h 15m
                Logged:
                Time Spent - 7 hours, 45 minutes Remaining Estimate - 4 days, 16 hours, 15 minutes
                7h 45m