velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: [tools] LinkTool.addAllParameters is not behaving as before
Date Tue, 26 Jul 2011 22:20:50 GMT
On Tue, Jul 26, 2011 at 2:59 PM, Christopher Schultz
<chris@christopherschultz.net> wrote:
> All,
>
> On 7/26/2011 5:23 PM, Christopher Schultz wrote:
>> As I get further into the testing of Velocity Tools 2.0, I'm finding
>> that the addAllParameters method isn't working as it used to.
>
> Given:
>
> #set($forward = $link.relative('/foo'))
>
> WORKS: \$forward=$forward
> WORKS: \$forward.addAllParameters()=$forward.addAllParameters()
> WORKS:
> \$link.setRelative('/foo').addAllParameters()=$link.setRelative('/foo').addAllParameters()
>
> Given:
>
> #set($forward = $link.relative('/foo').addQueryData('token', 'xyz'))
>
> (Note the added "addQueryData" call)
>
> FAILS: \$forward=$forward
> FAILS: \$forward.addAllParameters()=$forward.addAllParameters()
>
> Any ideas?

No, addQueryData in the deprecated version just forwards to
append(Object,Object) in the generic version, and both clearly return
the fresh copy of the LinkTool.  So, i see no reason for those
references to fully fail unless an exception is being thrown that you
are suppressing with an event handler.  Anything in the logs?

> I don't know why using a temporary reference would have any bearing on
> the behavior. Perhaps I'm stumbling into something else and drawing the
> wrong conclusion.
>
> Thanks,
> -chris
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message