velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Esposito" <espos...@newnetco.com>
Subject passing a null value to a method
Date Tue, 08 Oct 2002 22:57:40 GMT
I searched the mailing list and see a lot of talk about the NULL token and
about the fact that null values can't be passed to methods ... I wondered if
any resolution has been reached and which version of Velocity this will be
included in ...

Most particularly, I have a problem with the fact that if an object is in
the context, but has a value of null, a method call using this value will
not work ...

personMap.put("firstName","David");
context.put("person",personMap);

but in VTL, the following won't work because of the way that velocity treats
NULLs

$Formatter.formatName($person.firstName, $person.lastName)


Thanks in advance,
Dave


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message