velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apa...@recks.org
Subject Re: Putting key/value pair into hashmap from velocity template
Date Wed, 19 Jul 2006 15:00:13 GMT
try without the square brackets...

;) Christoph

Matthias Hendler wrote:
> Hello,
> 
> I try to put a key/value pair to a hashmap from velocity template.
> 
> First I put a new hashmap object into velocity context named "myMap".
> In my templates I can write:
> ...
> $myMap.clear()
> Size: $myMap.size()
> ...
> The above works fine. Now I want to put a key/value pair into the hashmap using the method
put(object, object).
> 
> So I wrote:
> ...
> ${myMap.put(["123", "test"])}
               ^             ^
> ...
> And I get an exception: "${myMap.put(["123", "test"])} is not a valid reference."
> 
> What's wrong?
> 
> Thanx 
> Matthias
> 
> 
> 
> 
> 
> 
> 
> 
> 

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