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

Shouldn't have to stop/start the server if the skin's css file has changed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.1-incubating-core-SNAPSHOT
    • Skinning
    • None

    Description

      When you change the skin's css file, you have to stop and restart the server to pick up the changes.
      99% of the code is already there to look to see if the StyleSheetDocument's timestamp is older than the file's timestamp.
      Right now this only works if the file is of type FileInputStreamProvider, not URLInputStreamProvider, and if it is an xss file, not a css file.

      So, the fix would be to check for File-based InputStream AND URL-based InputStream in _getDocumentTimestamp.
      if (provider != null)

      { // And this only works if we are using a File-based InputStream Object identifier = provider.getIdentifier(); if (identifier instanceof File) timestamp = ((File)identifier).lastModified(); }

      Also, recently I got rid of 2 lines of code in SkinStyleSheetParserUtils to save the provider on the ParseContext, and I will need to add this back.
      // Store a resolver relative to the file we're about to parse
      XMLUtils.setResolver(context, resolver.getResolver(sourceName));
      XMLUtils.setInputStreamProvider(context, provider);
      (the second line is needed for this)

      Attachments

        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: