incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1030800 - in /sling/trunk/samples/slingshot/src/main: java/org/apache/sling/sample/slingshot/impl/ resources/SLING-INF/content/libs/slingshot/Album/
Date Thu, 04 Nov 2010 02:03:44 GMT
Author: cziegeler
Date: Thu Nov  4 02:03:43 2010
New Revision: 1030800

URL: http://svn.apache.org/viewvc?rev=1030800&view=rev
Log:
Fix resource detection in sample app.

Modified:
    sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/photolist.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp

Modified: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java?rev=1030800&r1=1030799&r2=1030800&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
(original)
+++ sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
Thu Nov  4 02:03:43 2010
@@ -86,5 +86,12 @@ public class ResourceTypeConversionDecor
             return super.getResourceType();
         }
 
+        @Override
+        public boolean isResourceType(final String resourceType) {
+            if ( this.resourceType.equals(resourceType) ) {
+                return true;
+            }
+            return super.isResourceType(resourceType);
+        }
     }
 }

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/photolist.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/photolist.html.jsp?rev=1030800&r1=1030799&r2=1030800&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/photolist.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/photolist.html.jsp
Thu Nov  4 02:03:43 2010
@@ -28,7 +28,7 @@
      final Iterator<Resource> fi = resource.listChildren();
      while ( fi.hasNext()) {
          final Resource current = fi.next();
-         if ( current.isResourceType(Constants.RESOURCETYPE_FILE) 
+         if ( current.isResourceType(Constants.RESOURCETYPE_PHOTO) 
               && Constants.includeAsMedia(current)) {
              %>
              <sling:include resource="<%= current %>" resourceType="slingshot/Photo"
replaceSelectors="main"/>

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp?rev=1030800&r1=1030799&r2=1030800&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp
Thu Nov  4 02:03:43 2010
@@ -28,7 +28,7 @@
     final Iterator<Resource> ri = resource.listChildren();
     while ( ri.hasNext()) {
         final Resource current = ri.next();
-        if ( current.isResourceType(Constants.RESOURCETYPE_FOLDER) 
+        if ( current.isResourceType(Constants.RESOURCETYPE_ALBUM) 
              && Constants.includeAsAlbum(current)) {
             %><sling:include resource="<%= current %>" resourceType="slingshot/Album"
 replaceSelectors="treeentry"/><%
         }



Mime
View raw message