I need to correct myself here. After investigating the code more, I was able to get the result I wanted by sending in a map with id=null as params instead of sending in a null param arg. The code only pulls in values from the request if they're not explicitly included in the params map in urlFor. I still don't know if this is the desired behavior. It's certainly not what I expected.
davep On Wed, May 14, 2008 at 11:21 AM, David Primmer <[EMAIL PROTECTED]> wrote: > 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. > > davep >