Date: 2004-12-04T09:42:38
Editor: NathanBubna <[EMAIL PROTECTED]>
Wiki: Jakarta-Velocity Wiki
Page: VelocityFAQ
URL: http://wiki.apache.org/jakarta-velocity/VelocityFAQ
"empty" is better because "blank" could arguably mean an all whitespace
string
Change Log:
------------------------------------------------------------------------------
@@ -45,8 +45,8 @@
{{{
#if( "$!car.fuel" == "" )
}}}
- ''Note:'' The conditional will also pass if the result of $car.fuel is a
blank String. What this approach is actually checking is whether the reference
is '''null or blank'''.
-BTW, just checking for '''blank''' can be achieved by:
+ ''Note:'' The conditional will also pass if the result of $car.fuel is an
empty String. What this approach is actually checking is whether the reference
is '''null or empty'''.
+BTW, just checking for '''empty''' can be achieved by:
{{{
#if( "$car.fuel" == "" )
}}}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]