portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r383775 - in /portals/jetspeed-2/trunk/components/portal/src: java/org/apache/jetspeed/decoration/BaseDecoration.java java/org/apache/jetspeed/decoration/PageTheme.java test/org/apache/jetspeed/decoration/TestDecorations.java
Date Tue, 07 Mar 2006 04:40:09 GMT
Author: rwatler
Date: Mon Mar  6 20:40:07 2006
New Revision: 383775

URL: http://svn.apache.org/viewcvs?rev=383775&view=rev
Log:
allow stylesheets to be missing for layout/portlet decorators instead of generating a request
from the client that results in a 404

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PageTheme.java
    portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/decoration/TestDecorations.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java?rev=383775&r1=383774&r2=383775&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
Mon Mar  6 20:40:07 2006
@@ -86,15 +86,11 @@
                 {
                     locatedPath = locatedPath.substring(1);
                 }
-                           
                 cache.addPath(workingPath.toString(), locatedPath);
+                return locatedPath;
             }
-            
-           
-            
-            return locatedPath;
         }
-        
+	return null;
     }
     
     /**

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PageTheme.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PageTheme.java?rev=383775&r1=383774&r2=383775&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PageTheme.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PageTheme.java
Mon Mar  6 20:40:07 2006
@@ -65,7 +65,11 @@
     {
         // setup fragment decorations
         Decoration decoration = decorationFactory.getDecoration(page, fragment, requestContext);
-        styleSheets.add(decoration.getStyleSheet());
+        String styleSheet = decoration.getStyleSheet();
+        if (styleSheet != null)
+        {
+            styleSheets.add(styleSheet);
+        }
         fragmentDecorations.put(fragment.getId(), decoration);
 
         // setup nested fragment decorations

Modified: portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/decoration/TestDecorations.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/decoration/TestDecorations.java?rev=383775&r1=383774&r2=383775&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/decoration/TestDecorations.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/decoration/TestDecorations.java
Mon Mar  6 20:40:07 2006
@@ -119,7 +119,8 @@
         BaseDecoration decoration = new BaseDecoration(config, rv, testPathHtmlEn, prc);
         
         String result = decoration.getResource("/images/myimage.gif");
-        
+
+        assertNotNull(result);
         assertEquals(expectedResult, result);
         
         verify();
@@ -145,6 +146,7 @@
         
         String result = decoration.getResource("/images/myimage.gif");
         
+        assertNotNull(result);
         assertEquals(success, result);
         
         verify();



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message