[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: how do i deal with [preparing db results for VTL]?
From:       "Claude Brisson" <claude () savoirweb ! com>
Date:       2002-07-25 9:51:47
[Download RAW message or body]

Geir wrote :

> You also can make little utils that use a ResultSet's meta-data to
> automatically generate one of these list/map representations.

that's exactly what Velosurf does for you, you may try it if you've got several \
mappings of this kind in your application.

CloD

----- Original Message ----- 
From: "Geir Magnusson Jr." <geirm@adeptra.com>
To: <velocity-user@jakarta.apache.org>
Sent: jeudi 25 juillet 2002 04:24
Subject: Re: how do i deal with [preparing db results for VTL]?


> On 7/24/02 12:40 PM, "Tim Colson" <tcolson@cisco.com> wrote:
> 
> > The other responses which suggest creating a simple bean with
> > getter/setters works nicely. However, it's also simple to create an
> > array of hashmaps.
> > 
> 
> [SNIP]
> 
> > 
> > --
> > Then, in the template, it's as easy as:
> > 
> > #foreach ($user in $userlist)
> > $user.id - $user.name
> > #end
> > 
> > Your mileage will vary of course
> 
> I was going to suggest the same thing.  Is pretty easy, and fast for those
> of us too lazy to write a bean class for the data :)
> 
> You also can make little utils that use a ResultSet's meta-data to
> automatically generate one of these list/map representations.
> 
> -- 
> Geir Magnusson Jr. 
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic