velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Christian <si...@stoutstick.com>
Subject Re: Setting Null
Date Mon, 13 Sep 2004 08:37:38 GMT
I will often use #set( $boo = false ) in it's place, which if you're 
testing for the existence of the object ( #if( $boo )...#end ) works fine.

- simon

Shinobu Kawai wrote:

> Hi Peter,
> 
> 
>>I've been looking through the archives, and it seems that there is a roadmap
>>to have the ability to have set( $boo=null ) in 1.6. This roadmap was in the
>>developers list in January this year. The roadmap had 1.4 being released
>>ASAP, and 1.5 not far behind. Thing is that 1.4 was released in April, and we
>>havn't seen 1.5 yet.
>>
>>We are very keen to see this new feature since this issue almost lost us a
>>major customer when statements printed ended up being sent to the wrong
>>people - rather than having no address printed (address was null in some
>>records) it used the previously set address. The developer responsible knew
>>of the issue in Velocity, but just missed this consequence in this particular
>>code. Its just not failsafe, and while I'm a supporter of Velocity this
>>single issue continues to be a problem for us even though we are experiencd
>>in using it.
> 
> So how are you handling it right now?
> I can only think of making a tool that invokes Context#remove(String),
> something like
>   public void setNull(Context context, String key) {
>       context.remove(key);
>   }
> 
> Or an ugly
>   #set ($null = $ctx.remove("foo"))
> 
> Best regards,
> -- Shinobu Kawai
> 

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


Mime
View raw message