velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Glass-Husain <wgl...@forio.com>
Subject Re: clarification needed for getting HashMap values in the templates
Date Fri, 07 Jul 2006 21:19:03 GMT
yes.

WILL

jian chen wrote:
> Hi, All,
>
> As a long term Velocity user, I think I have been pretty savvy for 
> Velocity
> usage. Still got a question to ask though.
>
> If I put a HashMap in the Velocity template,
>
> HashMap map = new HashMap();
> map.put("aKey", "aValue");
> ctx.put("map", map);
>
> I can retrieve the value in the template by: $map.aKey.
>
> I tried to find relevant info. in Velocity user guide, but couldn't 
> find any
> relating this usage.
>
> So, is it that $map.aKey is the same as $map.get("aKey")?
>
> Thanks,
>
> Jian
>

-- 
Forio Business Simulations

Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.com


---------------------------------------------------------------------
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