velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jian chen" <chenjian1...@gmail.com>
Subject clarification needed for getting HashMap values in the templates
Date Fri, 07 Jul 2006 21:14:23 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message