Ah thanks!
This should work, but there a global macro somewhere in my code that
replaces all these blank "" for nulls by NA value.
Now I'll have to figure out whether this test comes first or it is the
macro. Someone else wrote this code and he's leaving....
It's fun being a programmer, excitement never stops!!!!! ;)

- Manish

p.s.
Nathan,
Are you one of the original developers of Velocity? I find your replies
quite useful and thorough.


----- Original Message -----
From: "Nathan Bubna" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 2004 12:43 PM
Subject: Re: Compare null


> Manish said:
> > How can I compare 'null' in my velocity template for if condition???
> > The following results in an error.
> >
> > #if(null == $p.getDisplayaddressbool()){
> > }
>
> you're confusing java with VTL.  VTL has no null keyword or token. (though
it
> was discussed favorably in ages long past.)
>
> i've found the most reliable way to test for nulls is:
>
> #if( "$!myboolean" == "" ) foo is null! #end
>
> Nathan Bubna
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to