You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Nathan Bubna <na...@esha.com> on 2002/07/12 17:51:52 UTC

[Veltools] Re: ParameterParser Was: Is there a target release date for the VelocityStrutssubproject?

Claude said:
...
> 1/
> I did not catch why ParameterParser was not a ViewTool. Is it because
> Struts can't give away access to the servlet context ?

it is currently not a ViewTool because the ViewTool interface did not exist
when I first wrote the class, and Gabe had some concerns about performance
(which i hope have been assuaged :-).  The patch i submitted to the list a
little while back would turn the ParameterParser into a ViewTool and greatly
simplify its use (you would no longer need to pass in $request for every
call to it).  The ParameterParser is not a part of the struts tools package,
and indeed has not at all tied to struts (though i have found my versi.

> 2/
...
>why not include a generic getter
> that would allow "dotted" vtl referencement of parameters, a la
> "$query.myparam", with something like :
...
>     public void get(String key) {
...
actually, i've had similar thoughts myself.  i almost added this to my
recent patch but didn't for some reason i can't think of now.   oh wait, i
think i didn't like the redundance of get() and getString() doing the same
thing and didn't want to get rid of the more explicit getString().  as i
think about it, i suppose it is sufficiently implicit that query string
values are indeed strings.  i suppose a plain get() would do fine, and it
would certainly be convenient when using the ParameterParser in templates.
perhaps i'll resend my patch with that alteration (and hope the powers that
be will someday commit it :-).

Nathan Bubna
nathan@esha.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>