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

unnecessary use of FacesContext in SkinProvider API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0-core
    • 2.1.1-core
    • Skinning
    • None

    Description

      SkinProvider API uses FacesContext in its methods. All that is done inside the API is to extract the ExternalContext. So it is sufficient to pass ExternalContext to the API. Though this is a public API change, the SkinProvider API is introduced recently and not widely used. This gives us a chance to correct the API now.

      Proposed change:

      • public Collection<SkinMetadata> getSkinMetadata(FacesContext context)
        + public Collection<SkinMetadata> getSkinMetadata(ExternalContext context) { return Collections.emptyList(); }
      • public abstract Skin getSkin(FacesContext context, SkinMetadata skinMetadata);
        + public abstract Skin getSkin(ExternalContext context, SkinMetadata skinMetadata);

      and the related internal API changes.

      Attachments

        1. jira-2433.patch
          158 kB
          Anand V Nath
        2. jira-2433-new.patch
          158 kB
          Anand V Nath

        Activity

          People

            jeanne.waldman@oracle.com Jeanne Waldman
            anand.v.nath@oracle.com Anand V Nath
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: