Problem is, this also returns true if $type is a Boolean with value
false.  I usually don't distinguish between the two and would use
this to check for nulls.  If $type could be null or a Boolean, you'll
want to use something fancier than the suggestion below to
distinguish between the two.

Barbara Baughman
X2157

On Wed, 30 Mar 2005, tarun Narang wrote:

> hi shashi
>
> try this too
>
> #if(!$type)
>
> .......statements
>
> #end
>
> ----- Original Message -----
> From: "Shinobu Kawai" <[EMAIL PROTECTED]>
> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
> Sent: Wednesday, March 30, 2005 10:29 PM
> Subject: Re: Comparing null...
>
>
> > Hi Sashi,
> >
> > > Can we compare null condition in velocity
> > >
> > >  # if ($type != null)
> > >
> > >  #end
> >
> > Check out here for more...
> >    http://wiki.apache.org/jakarta-velocity/VelocityFAQ
> >
> > Best regards,
> > -- Shinobu
> >
> > --
> > Shinobu Kawai <[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]
>
>

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

Reply via email to