Author: fmeschbe
Date: Fri Dec  4 12:23:18 2009
New Revision: 887169

URL: http://svn.apache.org/viewvc?rev=887169&view=rev
Log:
SLING-1219 Fix description of test entry field and ensure map(String) is called 
if the user provided just a path.

Modified:
    
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java

Modified: 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java?rev=887169&r1=887168&r2=887169&view=diff
==============================================================================
--- 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
 (original)
+++ 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
 Fri Dec  4 12:23:18 2009
@@ -114,7 +114,13 @@
         titleHtml(
             pw,
             "Configuration Test",
-            "To test the configuration, enter an URL or a resource path into 
the field and click 'Resolve' to resolve the URL or click 'Map' to map the 
resource path");
+            "To test the configuration, enter an URL or a resource path into " 
+
+            "the field and click 'Resolve' to resolve the URL or click 'Map' " 
+
+            "to map the resource path. To simulate a map call that takes the " 
+
+            "current request into account, provide a full URL whose " +
+            "scheme/host/port prefix will then be used as the request " +
+            "information. The path passed to map will always be the path part 
" +
+            "of the URL.");
 
         pw.println("<tr class='content'>");
         pw.println("<td class='content'>Test</td>");
@@ -180,7 +186,11 @@
                 // map or resolve as instructed
                 Object result;
                 if ("Map".equals(request.getParameter(ATTR_SUBMIT))) {
-                    result = resolver.map(helper, helper.getPathInfo());
+                    if (helper.getRemoteHost() == null) {
+                        result = resolver.map(helper.getPathInfo());
+                    } else {
+                        result = resolver.map(helper, helper.getPathInfo());
+                    }
                 } else {
                     result = resolver.resolve(helper, helper.getPathInfo());
                 }


Reply via email to