velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gagan 007 <gagan007in...@yahoo.com>
Subject RE: If the value is null in VelocityContext, the object is displayed same in Template...Can we get blank?
Date Fri, 11 Mar 2005 19:14:51 GMT
Thanx Dimitrios Kolovos  & Assia 
Its working 

Assia Aouat <assia@canada.sirsi.com> wrote:
I think that if you will use 

$!obj.getName()

with ! 

-----Original Message-----
From: Gagan 007 [mailto:gagan007india@yahoo.com] 
Sent: Friday, March 11, 2005 10:35 AM
To: velocity-user@jakarta.apache.org
Subject: If the value is null in VelocityContext, the object is
displayed same in Template...Can we get blank?
Importance: Low


HI , 
I m storing a object in the VelocityContext as 

context.put("obj", test);


in the Template file i m using 

$obj.getName()



if setName is not called on the test object before storing in the
context, it display 
$obj.getName() in the output

Is there any way to get blank, if the name is not populated (null)




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message