velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: AbstractPagerTool
Date Tue, 10 Aug 2004 16:38:50 GMT
Matthew Van Horn said:
> On Tue, 2004-08-10 at 23:50, Nathan Bubna wrote:
> > Matthew Van Horn said:
> > the tool looks pretty good.  the only real change i made while playing
with it
> > last night (and make AbstractSearchTool a subclass) was to change the
> > terminology (and method/variable naming) from "results" to plain "items",
> > because "results" implies a query to me and the pager tool doesn't do
> > what do you think about that?
> Sounds good to me. I didn't like 'results' either, but I was just too
> tired to think of something else. 'Items' is good. *smacks forehead*


> Now, I've got another itch to scratch with the link tool. Maybe there is
> alread a good way of doing this, but I haven't seen it yet. (Did I
> mention I'm tired...:)
> When I am using paging, I end up with two parameters in the query
> string. However, other stuff on the page requires some parameters as
> well. So I have a URL like:
> If I copy the whole querystring, and the do addQueryData('index', 30)
> I will get:
> which is wrong, since there are 2 index params.
> I am thinking there should be a
> updateQueryData(String name, String value) which would add the
> name/value but if it already existed, it would overwrite the old value.

sounds useful, but it would probably be better named

> Right now, I am using too much logic in my template to do this.
> (checking the name of each param in a loop, before calling addQueryData)
> It is not as maintainable as I'd like.
> What do you think of this idea? The way the QueryPairs are stored, I
> probably have to do the same loop w/ conditional over the ArrayList, but
> at least template designers don't have to hard code the parameter names
> to check for.

it's a good idea.  wanna contribute a patch? (preferrably as diff -u)

Nathan Bubna

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

View raw message