Never mind, I got it.
It was printing it because return value for all these map.put operations was
NULL.
call to clear() wasn't printed because it is void.
I put this all like this, and it's working now -

<!--
$mymap.clear()
$mymap.put("label.name","manish")
$mymap.put("label.country", "India")
-->

- Manish

----- Original Message -----
From: "Manish" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[email protected]>
Sent: Monday, January 31, 2005 7:32 PM
Subject: Adding map to toolbox


> Well, I tried to ad a HashMap to a toolbox as well, but none of its
methods
> (put basically) is working except clear()
>
> This is what I did in tool box-
>
>  <tool>
>   <key>mymap</key>
>   <scope>application</scope>
>   <class>java.util.HashMap</class>
>  </tool>
>
> Then I my velocity code I try this -
>
> $mymap.clear()
> $mymap.put("label.name","manish")
> $mymap.put("label.country", "India")
>
> but It doesn't work. The template shows me this -
>
> $mymap.put("label.name","manish") $circus.map.put("label.country",
"India")
>
> The clear is not shown, so I am assuming that it's getting executed a
$mymap
> is not NULL.
> Any help, pointers???
>
> TIA,
> - Manish
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to