What you have read is true, nevertheless it's very easy to write a tool wrapping your class, and such a tool does already exist in VelocityTools 2.0 (alpha, almost beta):
http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/ClassTool.html #foreach($field in $class.fields) #if($field.isStatic()) value of field $field.name is $field.staticValue #end #end Claude Le vendredi 08 février 2008 à 11:01 +0530, Manish a écrit : > If I have my class MyConstants with few static final strings in it, can I > refer > to it in velocity as this (provided I have put the class in toolbox) - > > MyConstants. USER_NAME > > I remember reading somewhere that static cannot be referenced in Velocity - > but > would like to confirm. Sorry for asking directly - with new machine & > administration policies I need couple of days before I could have entire > struts-velocity setup on my local machine. > > thanks, > - Manish > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
