Author: michiel
Date: 2009-05-18 23:13:57 +0200 (Mon, 18 May 2009)
New Revision: 35295
Modified:
mmbase/trunk/src/org/mmbase/framework/basic/BlockUrlConverter.java
Log:
Using 'toUndefaultMap' to assure that parameters which took their default value
are not added to the URL
Modified: mmbase/trunk/src/org/mmbase/framework/basic/BlockUrlConverter.java
===================================================================
--- mmbase/trunk/src/org/mmbase/framework/basic/BlockUrlConverter.java
2009-05-18 21:13:08 UTC (rev 35294)
+++ mmbase/trunk/src/org/mmbase/framework/basic/BlockUrlConverter.java
2009-05-18 21:13:57 UTC (rev 35295)
@@ -183,18 +183,23 @@
log.debug("" + niceUrl + " does not start with " +
request.getServletPath());
}
- Map<String, Object> params = action ? blockParameters.toMap() :
- framework.prefix(getState(frameworkParameters),
- blockParameters.toMap());
- if (log.isDebugEnabled()) {
- log.debug("Prefixed params " + params);
+ try {
+ Map<String, Object> params = action ?
+ blockParameters.toUndefaultMap() :
+ framework.prefix(getState(frameworkParameters),
blockParameters.toUndefaultMap());
+ if (log.isDebugEnabled()) {
+ log.debug("Prefixed params " + params);
+ }
+ map.putAll(params);
+ if (action) map.put("_action",
frameworkParameters.get("_action"));
+
+ String u = BasicUrlConverter.getUrl(niceUrl.getUrl(), map,
request, escapeAmps);
+ log.debug("Returning actual url " + u);
+ return new BasicUrl(this, u, niceUrl.getWeight());
+ } catch (RuntimeException re) {
+ log.error(re.getMessage(), re);
+ throw re;
}
- map.putAll(params);
- if (action) map.put("_action", frameworkParameters.get("_action"));
-
- String u = BasicUrlConverter.getUrl(niceUrl.getUrl(), map,
request, escapeAmps);
- log.debug("Returning actual url " + u);
- return new BasicUrl(this, u, niceUrl.getWeight());
} else {
return Url.NOT;
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs