incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r587829 - /incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
Date Wed, 24 Oct 2007 09:32:21 GMT
Author: bdelacretaz
Date: Wed Oct 24 02:32:20 2007
New Revision: 587829

URL: http://svn.apache.org/viewvc?rev=587829&view=rev
Log:
SLING-80 - map same-name request-parameters to multi-value properties in DefaultSlingServlet,
patch contributed by Lars Trieloff, thanks!

Modified:
    incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java

Modified: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java?rev=587829&r1=587828&r2=587829&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
(original)
+++ incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/slingservlets/DefaultSlingServlet.java
Wed Oct 24 02:32:20 2007
@@ -129,8 +129,12 @@
         // TODO ignore sling-specific properties like slingDisplayExtension
         for (Enumeration e = req.getParameterNames(); e.hasMoreElements();) {
             final String name = (String) e.nextElement();
-            final String value = req.getParameter(name);
-            n.setProperty(name, value);
+            final String[] values = req.getParameterValues(name);
+            if (values.length==1) {
+            	n.setProperty(name, values[0]);
+            } else {
+            	n.setProperty(name, values);
+            }
         }
     }
 



Mime
View raw message