velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bayarsaikhan VOLODYA <bayarsaik...@gmail.com>
Subject Null Value?
Date Fri, 15 Jul 2005 14:28:46 GMT
Hi all.

my .vm file is here;

#foreach( $user in $users )
<b>Middle Name:</b> $user.name.middleName<br> 
#end

it outputs the something like this. 

Middle Name: MyMiddleName
Middle Name: $user.name.middleName
Middle Name: test Name

since the second user.name <http://user.name> object has no value. null 
value. 
how to set velocity not to output $user.name.middleName. i want it just 
output nothing if property is null.

thanks a lot.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message