Reading over the docs, I see how you can iterate over the keys and values of a map. What I would like to do is check to see if a map contains a specific key (i.e., use the map's containsKey() method). Can this method be used in Velocity? I tried various syntactical combinations of the following...

#if ($status.errorMessages.containsKey("foo"))

...but they all throw an error. I suppose I could write a macro that just iterates through the key set and checks each one, but that seems like a lot of work--especially when this sort of thing is a breeze using JSPs.

S     |\_._/|     .-.
E     | o o |_   / /
S   _.(  T  ) `./ /
---(((-`-(((---------



Reply via email to