velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: Maps
Date Fri, 30 Aug 2002 23:51:07 GMT
"Juozas Baliuka" <baliuka@mail.lt> writes:

> Hi,
> I want to add some support for maps.
> Doe's somebody think it is usefull ?
> 
> someting like this:
> 
> map.put("key", "value");
> 
> context.put( "myMap", map );
> ------------------------------------
> 
> $myMap.key
> #set ( $myMap.key = "value2" )

This is already supported via the Map interface's get() method --
Velocity tries $myMap.get('key'), which resolves to "value".

> $myMap[ "key" ] 
> $myMap[ $var ] 

This array index syntax is not supported, as the $myMap object is not
an Array object.
-- 

Daniel Rall <dlr@finemaltcoding.com>

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


Mime
View raw message