velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Holt <jackch...@gmail.com>
Subject Re: Getting the "key" out of a Hashtable
Date Mon, 23 May 2005 22:04:06 GMT
Thanks that WAS the answer!  It works great!

On 5/23/05, Paul Barry <paul.barry@nyu.edu> wrote:
> Off the top of my head, I think this should work:
> 
> #foreach($key in $routeList.keySet())
>      Key = $key, Value = $routeList.get($key)
> #end
> 
> Jack Holt wrote:
> > I have Spring Web Flow with which I'm using Velocity.  I am using a
> > Hashtable to pass info to the Velocity template and can successfully
> > get the value side of each entry using code like this ($routeList is
> > the Hashtable):
> >
> > #foreach($route in $routeList)
> >       $route
> > #end
> >
> > How would I get the key of each entry?
> >
> > Do I need to use a Vector of Vectors instead perhaps?  What would you suggest?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message