velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: null in velocity
Date Thu, 02 Dec 2004 19:47:29 GMT
I think you can also do something like this:

#if($car && $car == "")

That is, if $car is defined and has no value (ie, null)
  ----- Original Message ----- 
  From: Shinobu Kawai 
  To: Velocity Users List 
  Sent: Thursday, December 02, 2004 10:56 AM
  Subject: Re: null in velocity


  Hi SUBBIAH,

  > How to check for null in velocity
  > for eg. I load a class in the context Class:: car
  > 
  > #if ($car.getFuel() = null ?? )

  You can use NullTool
    http://wiki.apache.org/jakarta-velocity/NullTool

  #if ($null.isNull($car.fuel))

  Best regards,
  -- Shinobu Kawai

  -- 
  Shinobu Kawai <shinobu.kawai@gmail.com>

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message