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

                 Key: ADFFACES-422
                 URL: https://issues.apache.org/jira/browse/ADFFACES-422
             Project: MyFaces ADF-Faces
          Issue Type: Improvement
          Components: Skinning
    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
            Reporter: Jeanne Waldman
         Assigned To: Jeanne Waldman
            Priority: Minor


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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to