velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [tools] LinkTool.addAllParameters is not behaving as before
Date Wed, 27 Jul 2011 14:58:42 GMT
On Tue, 26 Jul 2011 15:20:50 -0700, Nathan Bubna wrote:
> 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.

Here is some good news.

Although this fails:

#set($forward = $link.relative('/foo').addQueryData('token', 'xyz'))
FAIL  <p>\$forward.addAllParameters()=$forward.addAllParameters()</p>

This does not fail:

#set($forward = $link.relative('/foo').param('token', 'xyz'))
PASS  <p>\$forward.addRequestParams()=$forward.addRequestParams()</p>

So maybe it's a logic error in the implementation of addAllParameters 
specifically, and not the underlying implementation in LinkTool's new 

I'll have to look at the various templates I have using the "ignore" 
capabilities of addAllParameters. I have the sense that I need to be 
able to process the "ignores" one-at-a-time instead of putting them into 
a list and then passing them all in at once (although I suppose I could 
probably use ListTool or something to help me do that). I don't see a 
replacement for the one-at-a-time "ignores" processing. Was there a 
reason why that was removed altogether? It does make the API a bit 
cleaner yet slightly less flexible.

I'll investigate what happened here and probably provide a patch.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message