Calling static method from template in Apache Click
How 开发者_如何学Pythoncan I call a static method from a (velocity) template when using Apache Click?
You can use
addModel("MyClass", MyClass.class)
in your Page.
Velocity 1.6 and up supports this:
http://velocity.apache.org/engine/devel/developer-guide.html#supportforstaticclasses
精彩评论