#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:[EMAIL PROTECTED] 
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: [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