You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2007/11/01 18:52:21 UTC
[veltools] Alternate behavior for LinkTool's new addAllParameters
capability
All,
Nathan and I have just added "addAllParameters" capability to the
LinkTool (including explicit ignoring of current-request parameters) and
I started thinking about the Struts 2 behavior which is to automatically
ignore any parameter from the current request that has already been set
on the LinkTool.
Is anyone interested in this capability? I kind of like it. I find from
looking at my own code that everywhere I used it, I always ignored the
same parameters that I was already adding manually using addQueryData()
calls. It makes sense that in many (but perhaps not all) cases, users
will want this behavior.
I propose that we add the S2 behavior as the default option, but allow
the tool to be configured in the toolbox to support the explicit-ignore
capability as well.
The only necessary changes would be:
- Support a new configuration parameter
- If "auto-ignore" is set, all addQueryData (and friends) calls
will add a corresponding "ignore" parameter to the list
- Ignore list should probably become a Set
Any thoughts?
Thanks,
-chris
Re: [veltools] Alternate behavior for LinkTool's new addAllParameters capability
Posted by Nathan Bubna <nb...@gmail.com>.
+1 I think it makes sense that the default would be to ignore
actively set params.
On 11/1/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> All,
>
> Nathan and I have just added "addAllParameters" capability to the
> LinkTool (including explicit ignoring of current-request parameters) and
> I started thinking about the Struts 2 behavior which is to automatically
> ignore any parameter from the current request that has already been set
> on the LinkTool.
>
> Is anyone interested in this capability? I kind of like it. I find from
> looking at my own code that everywhere I used it, I always ignored the
> same parameters that I was already adding manually using addQueryData()
> calls. It makes sense that in many (but perhaps not all) cases, users
> will want this behavior.
>
> I propose that we add the S2 behavior as the default option, but allow
> the tool to be configured in the toolbox to support the explicit-ignore
> capability as well.
>
> The only necessary changes would be:
>
> - Support a new configuration parameter
> - If "auto-ignore" is set, all addQueryData (and friends) calls
> will add a corresponding "ignore" parameter to the list
> - Ignore list should probably become a Set
>
> Any thoughts?
>
> Thanks,
> -chris
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org