Comparing null...
Hi All, Can we compare null condition in velocity # if ($type != null) #end Thanks Sashi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Comparing null...
Try #if($null.isNotNull($type)) #if($null.isNull($type)) -Raj -Original Message- From: Majji, Sashibhushan [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 10:57 AM To: velocity-user@jakarta.apache.org Subject: Comparing null... Hi All, Can we compare null condition in velocity # if ($type != null) #end Thanks Sashi - 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]
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]
Re: Comparing null...
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]
Re: Comparing null...
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]