You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Michael Heuer <he...@acm.org> on 2004/05/14 19:22:34 UTC
velocity and java 1.5 enums
Hello,
I'd like to do something like the following with velocity:
enum Foo { A, B, C };
class Bar {
Foo getFoo();
}
Bar bar = new Bar() ...;
context.put("bar", bar);
#if ($bar.Foo == Foo.A)
baz!
#elseif ($bar.Foo == Foo.B)
qux!
#end
Is there a clean way to do this?
Thank you,
michael
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org