incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r433541 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main: java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java resources/META-INF/adf/styles/base-desktop.xss
Date Tue, 22 Aug 2006 06:16:41 GMT
Author: awiner
Date: Mon Aug 21 23:16:40 2006
New Revision: 433541

URL: http://svn.apache.org/viewvc?rev=433541&view=rev
Log:
Fix ADFFACES-147:  detect the version token and replace it with the actual JAR version at
runtime so our .css files have good names

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java?rev=433541&r1=433540&r2=433541&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
Mon Aug 21 23:16:40 2006
@@ -62,6 +62,21 @@
     Attributes   attrs) throws SAXParseException
   {
     _documentVersion = attrs.getValue(DOCUMENT_VERSION_ATTR);
+    // If the document version is ${trinidad-version}, replace it
+    // with the version number right out of our manifest
+    if ("${trinidad-version}".equals(_documentVersion))
+    {
+      Class<StyleSheetDocumentParser> implClass = StyleSheetDocumentParser.class;
+      Package implPkg = implClass.getPackage();
+      if ((implPkg != null) && (implPkg.getImplementationVersion() != null))
+      {
+        _documentVersion = implPkg.getImplementationVersion().replace('.','_');
+      }
+      else
+      {
+        _documentVersion = "unknown-version";
+      }
+    }
   }
 
   /**

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss?rev=433541&r1=433540&r2=433541&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
Mon Aug 21 23:16:40 2006
@@ -19,9 +19,9 @@
   base-desktop.xss defines all of the base styles for the Simple skins
 -->
 
-<!-- DO NOT CHANGE THE DOCUMENT VERSION FROM ${version} -->
+<!-- DO NOT CHANGE THE DOCUMENT VERSION FROM ${trinidad-version} -->
 <styleSheetDocument xmlns="http://myfaces.apache.org/uix/style"
-                    documentVersion="${version}"
+                    documentVersion="${trinidad-version}"
                     version="2.0">
 
 <!-- 



Mime
View raw message