velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lloyd <>
Subject Re: POLL: null context attribute values
Date Thu, 15 Jan 2004 22:38:58 GMT
Mike Kienenberger wrote:
> The more I use Velocity, the more I find myself writing hacks to get around 
> the inability of Velocity to handle nulls as a context attribute value.
> Over the last half-year I've been subscribed to the mailing list, I've seen 
> comments that suggest the current behavior can't be changed because it'd 
> break backwards compatiblity.
> Is there anyone on this mailing list that depends on context attributes not 
> being set to null when the RHS evalutes to null?
> Or are we all silently suffering because of some mythical or implausible use 
> case that doesn't exist?

i realize i'm coming to this a little late - what's the latest thinking 
on it?

i agree 100% that the null values problem is a BIG impediment to writing 
sane templates.  i've been silent on the list for a long time because 
velocity mostly gives me everything i need, but i'm working on a 
template that works with a deeply hierarchical object, with a lot of 
levels to iterate over, and *all* the elements at all levels can have 
null values.  lots of checks for nulls and #if blocks that contribute 
nothing but confusion...

if a value is null, it should be *null*, not the previous value  :-)

fix it and i'll never mention floats again! ( <-- pssst: liar )

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message