incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r993473 - in /sling/trunk/samples/slingshot: ./ src/main/java/org/apache/sling/sample/slingshot/ src/main/java/org/apache/sling/sample/slingshot/impl/ src/main/resources/META-INF/ src/main/resources/SLING-INF/content/libs/slingshot/Album/ s...
Date Tue, 07 Sep 2010 18:54:55 GMT
Author: cziegeler
Date: Tue Sep  7 18:54:54 2010
New Revision: 993473

URL: http://svn.apache.org/viewvc?rev=993473&view=rev
Log:
Update Sample:
- Use API 2.1
- Convert OptingServlet into ResourceDecorator

Added:
    sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
  (contents, props changed)
      - copied, changed from r993258, sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionServlet.java
Removed:
    sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionServlet.java
Modified:
    sling/trunk/samples/slingshot/NOTICE
    sling/trunk/samples/slingshot/pom.xml
    sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/Constants.java
    sling/trunk/samples/slingshot/src/main/resources/META-INF/NOTICE
    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/tags.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/trail.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tree.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/treeentry.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/main.html.jsp
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp

Modified: sling/trunk/samples/slingshot/NOTICE
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/NOTICE?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/NOTICE (original)
+++ sling/trunk/samples/slingshot/NOTICE Tue Sep  7 18:54:54 2010
@@ -1,5 +1,5 @@
 Apache Sling Slingshot Sample
-Copyright 2009 The Apache Software Foundation
+Copyright 2009-2010 The Apache Software Foundation
 
 Apache Sling is based on source code originally developed 
 by Day Software (http://www.day.com/).

Modified: sling/trunk/samples/slingshot/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/pom.xml?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/pom.xml (original)
+++ sling/trunk/samples/slingshot/pom.xml Tue Sep  7 18:54:54 2010
@@ -104,13 +104,13 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <version>1.2.0</version>
+            <version>1.3.0</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.0.8</version>
+            <version>2.1.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/Constants.java
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/Constants.java?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/Constants.java
(original)
+++ sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/Constants.java
Tue Sep  7 18:54:54 2010
@@ -17,7 +17,6 @@
 package org.apache.sling.sample.slingshot;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceUtil;
 
 public abstract class Constants {
 
@@ -53,7 +52,7 @@ public abstract class Constants {
      * and we also exclude the preview folder.
      */
     public static boolean includeAsAlbum(final Resource resource) {
-        final String name = ResourceUtil.getName(resource);
+        final String name = resource.getName();
         if ( name.equals(FOLDER_NAME_PREVIEW) || name.startsWith(".") ) {
             return false;
         }
@@ -64,7 +63,7 @@ public abstract class Constants {
      * Exclude all files starting with a dot
      */
     public static boolean includeAsMedia(final Resource resource) {
-        final String name = ResourceUtil.getName(resource);
+        final String name = resource.getName();
         if ( name.startsWith(".") ) {
             return false;
         }

Copied: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
(from r993258, sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionServlet.java)
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java?p2=sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java&p1=sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionServlet.java&r1=993258&r2=993473&rev=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionServlet.java
(original)
+++ sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
Tue Sep  7 18:54:54 2010
@@ -16,81 +16,75 @@
  */
 package org.apache.sling.sample.slingshot.impl;
 
-import java.io.IOException;
-
-import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Properties;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
-import org.apache.sling.api.request.RequestDispatcherOptions;
 import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceDecorator;
 import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.api.servlets.OptingServlet;
-import org.apache.sling.api.servlets.SlingAllMethodsServlet;
+import org.apache.sling.api.resource.ResourceWrapper;
 import org.apache.sling.sample.slingshot.Constants;
 
 /**
- * This opting servlet "converts" the standard resource types
+ * This resource decorator "converts" the standard resource types
  * nt:file, sling:Folder and nt:filder to the resource types used inside
  * Slingshot.
  *
- * We only accept requests to those resource types and only
- * if the resource is within the Slingshot albums folder.
- * The selector needs to be "slingshot"
- *
+ * We only adapt if the resource is within the Slingshot albums folder.
  */
-@SuppressWarnings("serial")
-@Component(metatype=false)
-@Service(value=javax.servlet.Servlet.class)
+@Component
+@Service(value=ResourceDecorator.class)
 @Properties({
-   @Property(name="sling.servlet.resourceTypes",value={Constants.RESOURCETYPE_FILE,
-                                                       Constants.RESOURCETYPE_FOLDER,
-                                                       Constants.RESOURCETYPE_EXT_FOLDER}),
    @Property(name="service.description",
-             value="Apache Sling - Slingshot Resource Type Conversion Servlet")
+             value="Apache Sling - Slingshot Resource Type Decorator")
 })
-public class ResourceTypeConversionServlet
-    extends SlingAllMethodsServlet
-    implements OptingServlet {
-
-    @Property(name="sling.servlet.extensions")
-    protected static final String EXTENSION = "html";
-
-    @Property(name="sling.servlet.selectors")
-    protected static final String SELECTOR = "slingshot";
+public class ResourceTypeConversionDecorator
+    implements ResourceDecorator {
 
     /**
-     * @see org.apache.sling.api.servlets.OptingServlet#accepts(org.apache.sling.api.SlingHttpServletRequest)
+     * @see org.apache.sling.api.resource.ResourceDecorator#decorate(org.apache.sling.api.resource.Resource)
      */
-    public boolean accepts(SlingHttpServletRequest request) {
-        // check everything again (except the resource type)
-        return request.getResource().getPath().startsWith(Constants.ALBUMS_ROOT)
-               && EXTENSION.equals(request.getRequestPathInfo().getExtension())
-               && SELECTOR.equals(request.getRequestPathInfo().getSelectorString());
+    public Resource decorate(Resource resource) {
+        return this.decorate(resource, null);
     }
 
-    private String getResourceType(final Resource resource) {
-        if ( ResourceUtil.isA(resource, Constants.RESOURCETYPE_FILE) ) {
-            return Constants.RESOURCETYPE_PHOTO;
+    /**
+     * @see org.apache.sling.api.resource.ResourceDecorator#decorate(org.apache.sling.api.resource.Resource,
javax.servlet.http.HttpServletRequest)
+     */
+    public Resource decorate(Resource resource, HttpServletRequest request) {
+        if ( resource.getPath().startsWith(Constants.ALBUMS_ROOT) ) {
+            if ( ResourceUtil.isA(resource, Constants.RESOURCETYPE_FILE) ) {
+                return new SlingshotResource(resource, Constants.RESOURCETYPE_PHOTO);
+            }
+            if ( ResourceUtil.isA(resource, Constants.RESOURCETYPE_EXT_FOLDER)
+                 || ResourceUtil.isA(resource, Constants.RESOURCETYPE_FOLDER) ) {
+                return new SlingshotResource(resource, Constants.RESOURCETYPE_ALBUM);
+            }
         }
-        return Constants.RESOURCETYPE_ALBUM;
+        return resource;
     }
 
-    /**
-     * @see org.apache.sling.api.servlets.SlingSafeMethodsServlet#doGet(org.apache.sling.api.SlingHttpServletRequest,
org.apache.sling.api.SlingHttpServletResponse)
-     */
-    protected void doGet(SlingHttpServletRequest request,
-                         SlingHttpServletResponse response)
-    throws ServletException, IOException {
-        final RequestDispatcherOptions options = new RequestDispatcherOptions();
-        // force new resource type
-        options.setForceResourceType(this.getResourceType(request.getResource()));
-        // remove all selectors
-        options.setReplaceSelectors("");
-        request.getRequestDispatcher(request.getResource(), options).forward(request, response);
+    public static final class SlingshotResource extends ResourceWrapper {
+
+        private final String resourceType;
+
+        public SlingshotResource(final Resource resource, final String resourceType) {
+            super(resource);
+            this.resourceType = resourceType;
+        }
+
+        @Override
+        public String getResourceType() {
+            return this.resourceType;
+        }
+
+        @Override
+        public String getResourceSuperType() {
+            return super.getResourceType();
+        }
+
     }
 }

Propchange: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/trunk/samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/ResourceTypeConversionDecorator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sling/trunk/samples/slingshot/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/META-INF/NOTICE?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/META-INF/NOTICE (original)
+++ sling/trunk/samples/slingshot/src/main/resources/META-INF/NOTICE Tue Sep  7 18:54:54 2010
@@ -1,5 +1,5 @@
 Apache Sling Slingshot Sample
-Copyright 2009 The Apache Software Foundation
+Copyright 2009-2010 The Apache Software Foundation
 
 Apache Sling is based on source code originally developed 
 by Day Software (http://www.day.com/).

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=993473&r1=993472&r2=993473&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
Tue Sep  7 18:54:54 2010
@@ -19,17 +19,16 @@
 %><%@page import="java.util.Iterator,
                   java.util.List,
                   org.apache.sling.api.resource.Resource,
-                  org.apache.sling.api.resource.ResourceUtil,
                   org.apache.sling.sample.slingshot.Constants" %><%
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
 %><div class="photolist">
  <%
      int i = 0;
-     final Iterator<Resource> fi = ResourceUtil.listChildren(resource);
+     final Iterator<Resource> fi = resource.listChildren();
      while ( fi.hasNext()) {
          final Resource current = fi.next();
-         if ( ResourceUtil.isA(current, Constants.RESOURCETYPE_FILE) 
+         if ( current.isResourceType(Constants.RESOURCETYPE_FILE) 
               && 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/tags.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tags.html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tags.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/tags.html.jsp
Tue Sep  7 18:54:54 2010
@@ -27,11 +27,11 @@
    <%
    final Resource tags = resource.getResourceResolver().getResource("/slingshot/tags");
    if ( tags != null ) {
-       final Iterator<Resource> ni = tags.getResourceResolver().listChildren(tags);
+       final Iterator<Resource> ni = tags.listChildren();
        while ( ni.hasNext() ) {
            final Resource current = ni.next();
            final ValueMap attr = ResourceUtil.getValueMap(current);
-           %><div class="tag"><a href="<%= request.getContextPath() %><%=
current.getPath() %>.html"><%=ResourceUtil.getName(current) %></a></div><%
+           %><div class="tag"><a href="<%= request.getContextPath() %><%=
current.getPath() %>.html"><%=current.getName() %></a></div><%
        }
    }
    %>

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/trail.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/trail.html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/trail.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/trail.html.jsp
Tue Sep  7 18:54:54 2010
@@ -30,14 +30,14 @@
     // let's create the trail
     final List<Object[]> parents = new ArrayList<Object[]>();
     if ( resource.getPath().startsWith(Constants.ALBUMS_ROOT + '/') ) {
-        Resource parent = ResourceUtil.getParent(resource);
+        Resource parent = resource.getParent();
         String prefix = "../";
         boolean continueProcessing = true;
         do {
             final ValueMap parentAttr = ResourceUtil.getValueMap(parent);
-            final String parentName = ResourceUtil.getName(parent);
+            final String parentName = parent.getName();
             parents.add(new Object[] {prefix + parentName, parentAttr.get("jcr:title", parentName)});
-            parent = ResourceUtil.getParent(parent);
+            parent = parent.getParent();
             prefix = prefix + "../";
             if ( parent.getPath().equals(Constants.APP_ROOT) ) {
                 continueProcessing = false;

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=993473&r1=993472&r2=993473&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
Tue Sep  7 18:54:54 2010
@@ -18,7 +18,6 @@
 --%><%@page session="false" %><%
 %><%@page import="java.util.Iterator,
                   org.apache.sling.api.resource.Resource,
-                  org.apache.sling.api.resource.ResourceUtil,
                   org.apache.sling.sample.slingshot.Constants" %><%
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
@@ -26,10 +25,10 @@
   <div class="albumlist">
     <h2>Contained Albums</h2>
     <%
-    final Iterator<Resource> ri = ResourceUtil.listChildren(resource);
+    final Iterator<Resource> ri = resource.listChildren();
     while ( ri.hasNext()) {
         final Resource current = ri.next();
-        if ( ResourceUtil.isA(current, Constants.RESOURCETYPE_FOLDER) 
+        if ( current.isResourceType(Constants.RESOURCETYPE_FOLDER) 
              && Constants.includeAsAlbum(current)) {
             %><sling:include resource="<%= current %>" resourceType="slingshot/Album"
 replaceSelectors="treeentry"/><%
         }

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/treeentry.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/treeentry.html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/treeentry.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Album/treeentry.html.jsp
Tue Sep  7 18:54:54 2010
@@ -22,6 +22,6 @@
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
   ValueMap attributes = ResourceUtil.getValueMap(resource);
-  Resource parent = ResourceUtil.getParent(resource);
-  String name = ResourceUtil.getName(resource);
-%>- <a href="<%=ResourceUtil.getName(parent) %>/<%=name %>.slingshot.html"><%=attributes.get("jcr:title",
name) %></a><br/>
\ No newline at end of file
+  Resource parent = resource.getParent();
+  String name = resource.getName();
+%>- <a href="<%=parent.getName() %>/<%=name %>.slingshot.html"><%=attributes.get("jcr:title",
name) %></a><br/>
\ No newline at end of file

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/html.jsp
Tue Sep  7 18:54:54 2010
@@ -21,14 +21,14 @@
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
     final ValueMap attributes = ResourceUtil.getValueMap(resource);
-    final String photoName = attributes.get("jcr:title", ResourceUtil.getName(resource));
+    final String photoName = attributes.get("jcr:title", resource.getName());
 %><html>
   <head>
     <title><%= photoName %></title>
   </head>
   <body>
     <h1><%= photoName %></h1>
-    <img src="<%=ResourceUtil.getName(resource) %>"/>
+    <img src="<%=resource.getName() %>"/>
     <p>Description: <%=attributes.get("jcr:description", "")%></p>
     <p>Location: <%=attributes.get("slingshot:location", "")%></p>
     <p>Tags:&nbsp

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/main.html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/main.html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/main.html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Photo/main.html.jsp
Tue Sep  7 18:54:54 2010
@@ -25,11 +25,11 @@
 %><div class="photo">
 <%
     final ValueMap attr = ResourceUtil.getValueMap(resource);
-    final String albumName = ResourceUtil.getName(ResourceUtil.getParent(resource));
-    final String photoName = attr.get("jcr:title", ResourceUtil.getName(resource));
+    final String albumName = resource.getParent().getName();
+    final String photoName = attr.get("jcr:title", resource.getName());
     final String relPath = resource.getPath();
     String imagePath = relPath;
-    String previewPath = ResourceUtil.getParent(resource).getPath() + '/' + Constants.FOLDER_NAME_PREVIEW
+ '/' + ResourceUtil.getName(resource);
+    String previewPath = resource.getParent().getPath() + '/' + Constants.FOLDER_NAME_PREVIEW
+ '/' + resource.getName();
     if ( resource.getResourceResolver().getResource(previewPath) != null ) {
         imagePath = previewPath;
     }

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp?rev=993473&r1=993472&r2=993473&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
(original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
Tue Sep  7 18:54:54 2010
@@ -24,7 +24,7 @@
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
     final ValueMap attributes = ResourceUtil.getValueMap(resource);
-    final String name = ResourceUtil.getName(resource);
+    final String name = resource.getName();
     final ResourceResolver resolver = resource.getResourceResolver();
 %><html>
   <head>



Mime
View raw message