velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veerabahu subramanian <>
Subject Property to turn off velocity from echoing reference
Date Mon, 23 Feb 2009 08:39:33 GMT
Hi All,
I am trying to do a collection manipulation in Velocity, i.e. I will check
for existence of key in a HashMap and if it exists I will append the current
value if not I will add the current value.
The template file for this is as below

#foreach($listItem in $list)
##if the value exists in the map
Dummy map is $dummymap

In this I have two doubts
  1. If I didn't assign the return value
of ${dummymap.put($listItem,$existingvalue)} to a variable then the return
value is rendered as a output. Is there any property to turn off this
behavior. I did a search for the same also checked the
in latest build but I don't find a relevant one.
 2. Will dummymap treated as a string internally by velocity. Mainly I want
to know will there be a performance improvement if i do the above logic
inside "#foreach($listItem in $list) " in Java instead of template file


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