abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Primmer" <david.prim...@gmail.com>
Subject urlFor in RouteManager does not let you null out vars
Date Wed, 14 May 2008 18:21:33 GMT
I'm trying to implement getHref in an adapter, which returns the url
for the collection. I'm also using RouteManager and it's urlfor

      for (String var : route.getVariables()) {
        Object value = context.getTarget().getParameter(var);
        if (!map.containsKey(var) && value != null) {
          map.put(var, value);

say my route is /feed/:id
and my request is /feed/1

if i'm doing urlFor("myroute", null), hoping that it produces /feed/
as a url, but instead, the code above pulls the id out of the request
context and fills in those params, giving me a url of /feed/1. I don't
understand why it would do this and it limits the use of urlFor for
generating collection urls.


View raw message