How do I check for a Null value using Velocity Template Language?
843838Aug 12 2006 — edited Aug 14 2006Hello All,
Yes, this is not a JSP topic but it's the best place I could find to post this question as the Velocity site (http://jakarta.apache.org/velocity/index.html) doesn't appear to have a forum.
My question is how to deal with a Null value that I'm pulling from a Java object that is being passed to Velocity through the session. The $type (see below) refers to my class and the ApIntSchdTypeRunWorkday (see below) refers to my getApIntSchdTypeRunWorkday() method in that class. That method will sometimes return a Null value which causes Velocity to display the actual code, $type.ApIntSchdTypeRunWorkday, instead of a blank.
$type.ApIntSchdTypeRunWorkday
Using Velocity, how do I check to see if the method is returning a Null so I can change it to a blank value? At this point modifing the Java object before it gets to Velocity is not an option.
Thanks for your help.