Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1729

provide a hook for for an external decorator of Skin InputStreamProvider

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.15-core , 2.0.0-beta-1
    • Skinning
    • None

    Description

      A third party (Oracle MDS) would like to use their own InputStreamProvider to find skinning css files (like purple-desktop.css) in their own system. The current ways to find css files do not work for them.
      1. We first discussed decorating ExternalContext.getResource(), since in
      Trinidad we create the URL by calling FacesContext's ExternalContext's
      getResource(style-sheet-name). For an example, see
      http://insights2jsf.wordpress.com/2009/07/03/using-custom-factories-or-howto-wrap-facescontext/
      2. This won't work for them because it returns an URL object
      3. using ExternalContext's getResourceAsStream won't work because you can't find out if the file has been modified.
      4. What would work is if they decorate or extend the InputStreamProvider, and we check this if none of the other means finds the .css file. The other means are those found in SkinStyleSheetProvider.java
      5. To allow them to plugin their InputStreamProvider we
      can do this with a service provider interface where we open up
      META-INF/services/<fully qualified classname of service> and load all of the
      services that way.

      Attachments

        1. patch1.2.12.3ForJIRA1729
          0.9 kB
          Jeanne Waldman
        2. MDSNameResolver.jar
          3 kB
          Jeanne Waldman
        3. NameResolverPatch1212.patch
          25 kB
          Jeanne Waldman

        Activity

          People

            jeanne.waldman@oracle.com Jeanne Waldman
            jeanne.waldman@oracle.com Jeanne Waldman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: