List in velocity macro, cannot find

Posted by fastcodejava on Stack Overflow See other posts from Stack Overflow or by fastcodejava
Published on 2010-05-09T23:46:56Z Indexed on 2010/05/09 23:48 UTC
Read the original article Hit count: 233

Filed under:
|

I put a list strings as validTypes in velocity. When I do :

#if (${validTypes}.contains("aaa"))
  // do something
#end

it throws an error. But when I do :

#foreach (${validType} in ${validTypes})
   ${validType}
#end

it works fine. Do I need to use velocity tools for this? How do I use it in an eclipse plugin? Are there any work around without using velocity tools?

© Stack Overflow or respective owner

Related posts about velocity

Related posts about eclipse