velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [tools] LinkTool.addAllParameters is not behaving as before
Date Tue, 26 Jul 2011 21:59:05 GMT
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?

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


Mime
View raw message