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/06/03 20:57:32 UTC
[Veltools] query result tool Was: Re: Velocity vmlibs
Nathan said:
> > > Tools I'd like to see added:
> > >
> > > - CurrencyTool: Tool to format currencies
> > > - TablePagerTool: Tool to render a large DB query result page by page.
> >
> > I would specifically love to see something like this (especially if it
> works
> > with Collections).
>
> i have something like this that I use quite a bit. i posted a version
some
> ages back called SearchTool. I'll see if i can't find some time to clean
> it up and repost it.
Ok, i've cleaned up the aforementioned tool a bit, so here it is.
Basically, it's an abstract tool that deals with most of the work needed to
page thru a large List of query results efficiently. Implementations of it
need only implement three methods (executeQuery(), getStoredResults(), and
setStoredResults()) and set the search criteria and page index. This allows
you to control where the current result list is stored and, of course,
perform whatever query you wish.
i've also attached the demo implementation and template that i used to test
it. (Gabe, perhaps this could be worked into an example app somehow?)
hope this works for ya'll.
Nathan Bubna
nathan@esha.com
Re: [Veltools] query result tool Was: Re: Velocity vmlibs
Posted by Gabriel Sidler <si...@teamup.ch>.
Nathan Bubna wrote:
> Nathan said:
>
>>>>Tools I'd like to see added:
>>>>
>>>>- CurrencyTool: Tool to format currencies
>>>>- TablePagerTool: Tool to render a large DB query result page by page.
>>>>
>>>I would specifically love to see something like this (especially if it
>>>
>>works
>>
>>>with Collections).
>>>
>>i have something like this that I use quite a bit. i posted a version
>>
> some
>
>>ages back called SearchTool. I'll see if i can't find some time to clean
>>it up and repost it.
>>
>
> Ok, i've cleaned up the aforementioned tool a bit, so here it is.
>
> Basically, it's an abstract tool that deals with most of the work needed to
> page thru a large List of query results efficiently. Implementations of it
> need only implement three methods (executeQuery(), getStoredResults(), and
> setStoredResults()) and set the search criteria and page index. This allows
> you to control where the current result list is stored and, of course,
> perform whatever query you wish.
>
> i've also attached the demo implementation and template that i used to test
> it. (Gabe, perhaps this could be worked into an example app somehow?)
>
> hope this works for ya'll.
Great! I'll add this soon and also setup some examples. That's something
I had planned anyway.
Gabe
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>