Maps are available in Velocity 1.5. Are you still using 1.4?

Also, if you write #set($monkey.Map=...) the $monkey object must have a
setMap method or a generic setter.


 Claude

Le lundi 20 août 2007 à 17:10 -0400, Beland, Andre a écrit :
> The user documentation sais:
> #set( $monkey.Map = {"banana" : "good", "roast beef" : "bad"}) ## Map 
> 
> 
> But I get a parsing exception when I try:
> ------------------------------------------------------------------------
> --------
> ##Set some values within the template
> ## Works fine
> #set( $text = "this is some text" )
> 
> ## Map - BROKEN
> #set( $myLiteralMap = {"message" : "hello", "foo" : "bar"}) 
> 
> Here is some text:
> $text
> 
> Here are some values:
> #foreach( $key in $myLiteralMap.keySet() )
>   $key  has a value of:  $myLiteralMap.get($key)
> #end
> ------------------------------------------------------------------------
> --------
> 
> 
> Is it possible to INITIALIZE a map from within a template? If so, how?
> 
> Thanks.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to