Author: hlship
Date: Thu Dec 20 12:02:49 2007
New Revision: 606014

URL: http://svn.apache.org/viewvc?rev=606014&view=rev
Log:
TAPESTRY-1994: Allow easy override of the default Tapestry stylesheet

Removed:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/grid/ListGridDataSource.java
    
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/ListGridDataSourceTest.java
Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/annotations/Path.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/annotations/Path.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/annotations/Path.java?rev=606014&r1=606013&r2=606014&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/annotations/Path.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/annotations/Path.java
 Thu Dec 20 12:02:49 2007
@@ -38,8 +38,6 @@
      * The path to the resource; if prefixed (say with "classpath:") then its 
a complete path within
      * the identified namespace; otherwise it's a relative path from the class 
containing the
      * annotation. Symbols will be expanded.
-     *
-     * @return
      */
     String value();
 }

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java?rev=606014&r1=606013&r2=606014&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java
 Thu Dec 20 12:02:49 2007
@@ -1280,18 +1280,18 @@
     }
 
     /**
-     * Adds basic render initializers:
+     * Adds basic render initializers, each of which provides an [EMAIL 
PROTECTED] org.apache.tapestry.annotations.Environmental} service:
      * <dl>
      * <dt>PageRenderSupport</dt>  <dd>Provides [EMAIL PROTECTED] 
PageRenderSupport}</dd>
      * <dt>ZoneSetup</dt> <dd>Provides [EMAIL PROTECTED] ZoneSetup}</dd>
      * <dt>Heartbeat</dt> <dd>Provides [EMAIL PROTECTED] 
org.apache.tapestry.services.Heartbeat}</dd>
      * <dt>DefaultValidationDecorator</dt>
-     * <dd>Provides [EMAIL PROTECTED] org.apache.tapestry.ValidationDecorator} 
(as [EMAIL PROTECTED] 
org.apache.tapestry.internal.DefaultValidationDecorator})</dd>
+     * <dd>Provides [EMAIL PROTECTED] org.apache.tapestry.ValidationDecorator} 
(as an instance of [EMAIL PROTECTED] 
org.apache.tapestry.internal.DefaultValidationDecorator})</dd>
      * </dl>
      */
     public void 
contributePageRenderInitializer(OrderedConfiguration<MarkupRendererFilter> 
configuration,
 
-                                                
@Path("org/apache/tapestry/default.css")
+                                                
@Path("${tapestry.default-stylesheet}")
                                                 final Asset stylesheetAsset,
 
                                                 
@Path("org/apache/tapestry/field-error-marker.png")
@@ -1538,6 +1538,8 @@
         configuration.add("tapestry.default-cookie-max-age", "7 d");
 
         configuration.add("tapestry.start-page-name", "start");
+
+        configuration.add("tapestry.default-stylesheet", 
"org/apache/tapestry/default.css");
 
         // This is designed to make it easy to keep synchronized with 
script.aculo.ous. As we
         // support a new version, we create a new folder, and update the path 
entry. We can then

Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt?rev=606014&r1=606013&r2=606014&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt 
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt Thu Dec 
20 12:02:49 2007
@@ -85,7 +85,14 @@
     
     Primarily, this is used with a cookie that exists 
     to track the preferred user locale.
-    
+
+  [tapestry.default-stylesheet]
+    The default stylesheet automatically injected into every rendered HTML 
page.  Many Tapestry components assume that
+    this stylesheet is available.  All the classes defined in the stylesheet 
are prefixed with "t-". The exact contents
+    of the stylesheet are subject to change at any time (they are considered 
internal), so replacing the stylesheet,
+    rather than overriding selected rules within it, entails some risk.
+
+    The default is org/apache/tapestry/default.css, stored on the classpath.
   
   [tapestry.file-check-interval]
     Time (in milliseconds) between file system checks. During a file system 
check, only a single thread is active (all others


Reply via email to