Update of /var/cvs/src/org/mmbase/framework/basic
In directory james.mmbase.org:/tmp/cvs-serv10202

Modified Files:
        BasicUrlConverter.java 
Log Message:
if url is not generated to a block, then also don't prefix the parameters (bug 
demonstrated in test/urls.jspx)


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/framework/basic


Index: BasicUrlConverter.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/basic/BasicUrlConverter.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- BasicUrlConverter.java      25 Mar 2008 21:00:24 -0000      1.14
+++ BasicUrlConverter.java      11 Apr 2008 10:23:58 -0000      1.15
@@ -26,7 +26,7 @@
  *
  *
  * @author Michiel Meeuwissen
- * @version $Id: BasicUrlConverter.java,v 1.14 2008/03/25 21:00:24 nklasens 
Exp $
+ * @version $Id: BasicUrlConverter.java,v 1.15 2008/04/11 10:23:58 michiel Exp 
$
  * @since MMBase-1.9
  */
 public final class BasicUrlConverter implements UrlConverter {
@@ -144,6 +144,14 @@
             map.put(e.getKey(), e.getValue());
         }
         if (state.isRendering()) {
+            Block block = state.getBlock();
+            if (log.isDebugEnabled()) {
+                log.debug("current block " + block);
+            }
+            Block toBlock = block.getComponent().getBlock(path);
+
+            if (toBlock != null) {
+
             map = new TreeMap<String, Object>(framework.prefix(state, map));
             String prefix = framework.getPrefix(state);
             log.debug("Using prefix " + prefix);
@@ -162,12 +170,7 @@
                     map.put(k, entry.getValue());
                 }
             }
-            Block block = state.getBlock();
-            if (log.isDebugEnabled()) {
-                log.debug("current block " + block);
-            }
-            Block toBlock = block.getComponent().getBlock(path);
-            if (toBlock != null) {
+
                 path = null;
                 if (! toBlock.equals(block)) {
                     log.debug("New block " + toBlock);
@@ -178,6 +181,7 @@
             } else {
                 log.debug("No block '" + path + "' found");
             }
+
         }
         log.debug("constructing '" + path + "'" + map);
         return BasicUrlConverter.getUrl(path, map, request, escapeAmps);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to