Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 88648 invoked from network); 15 May 2008 15:09:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 15:09:54 -0000 Received: (qmail 48883 invoked by uid 500); 15 May 2008 15:09:55 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 48866 invoked by uid 500); 15 May 2008 15:09:55 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 48855 invoked by uid 99); 15 May 2008 15:09:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 08:09:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasnell@gmail.com designates 209.85.132.251 as permitted sender) Received: from [209.85.132.251] (HELO an-out-0708.google.com) (209.85.132.251) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 15:09:09 +0000 Received: by an-out-0708.google.com with SMTP id b38so98020ana.83 for ; Thu, 15 May 2008 08:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=8L9H2A1QfgLXmuvjboBOA4SvuSvxgIJUIMJINgKxfIE=; b=FC6y1XeYMpuI9E8igkQ6I0d27ivhWZeLfzu/VZZU6kRU/BIOlMtXRtqCvvKg1Znvf5/3fn04n2OjGDv8a6LpsOqrSkc5nplaW88KuLHpJGF0xyMl5xNRCTCkHdV2LTnD+ZVn9EeCgjk6O9SwazkYWoH+rrO7EmfsJUnj42VEW/o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=w8pzf+7z1kTScy12OVi8bpteNQp1lmUUFBcI1WDBML5UUP5UiyRuKgxGa67pZ073LD3cIm1SKAWOWv++2kYzjz1El6nyXyz/Gj5lJkZAyf2uIEf9gQeEhJnVV5feX98KbCfNKMd1h+x9RbUIlGSBJLljanas19Pt1/W2Z4ezkuA= Received: by 10.100.105.15 with SMTP id d15mr3109367anc.149.1210864164006; Thu, 15 May 2008 08:09:24 -0700 (PDT) Received: from ?192.168.2.2? ( [98.224.93.96]) by mx.google.com with ESMTPS id c37sm5675731ana.11.2008.05.15.08.09.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 May 2008 08:09:23 -0700 (PDT) Message-ID: <482C5216.4030809@gmail.com> Date: Thu, 15 May 2008 08:09:10 -0700 From: James M Snell User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: abdera-dev@incubator.apache.org Subject: Re: urlFor in RouteManager does not let you null out vars References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ok, we need to fix that. Want to open a jira issue? - James David Primmer wrote: > 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 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 >> >