velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalyani Kale" <kaly...@ascindia.com>
Subject RE: Compare null
Date Wed, 06 Oct 2004 07:21:54 GMT
#set ( $displayAddr = $p.getDisplayaddressbool())

if($displayAddr)
	//if displayAddr is not null
#else
	//control will come here if displayAddr is null #end

If the above code is inside a for loop, the u'll have to set $displayAddr to
false at the end of the loop.

#set ( $displayAddr = false )


Kalyani

-----Original Message-----
From: Manish [mailto:prolist@gmx.net] 
Sent: Wednesday, October 06, 2004 12:24 PM
To: Velocity Users List
Subject: Compare null

How can I compare 'null' in my velocity template for if condition???
The following results in an error.

#if(null == $p.getDisplayaddressbool()){
}

TIA,
- Manish


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





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


Mime
View raw message