velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gagan 007 <gagan007in...@yahoo.com>
Subject If the value is null in VelocityContext, the object is displayed same in Template...Can we get blank?
Date Fri, 11 Mar 2005 15:34:46 GMT

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 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message