velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven Meier" <s...@meiers.net>
Subject Re: null in velocity
Date Thu, 11 Apr 2002 19:54:37 GMT
Hi,

the reason for this is that velocityContext doesn't accept NULL value in the
put() method, see:

http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg05700.html

The thread ends with:

"After a talk here we all agreed on Geir's proposal. Setting a variable to
NULL will
remove it from the context."

.. but I don't know what became of it.

I've solved this with a overridden put() in my own subclass of
velocityContext.

Sven

----- Original Message -----
From: Jing Chen <jingc@marketderby.com>
To: Velocity Users List <velocity-user@jakarta.apache.org>
Sent: Thursday, April 04, 2002 4:24 AM
Subject: null in velocity


>
>  Hi there,
>
> Dose velocity support null? e.g.
>
> #set( $msgs = $requ.getMessages())
>
> getMessages() returns an Object[], now, if $msgs has some value of
Object[],
> and getMessages() returns null, then the $msgs keeps the original value,
it
> cannot change to null, dose velocity handle such problems?
>
> thanks
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>


--
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