velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitrios Kolovos" <dskolo...@gmail.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 15:37:23 GMT
$!obj.getName()

(silent mode)

Dimitrios

----- Original Message ----- 
From: "Gagan 007" <gagan007india@yahoo.com>
To: <velocity-user@jakarta.apache.org>
Sent: Friday, March 11, 2005 3:34 PM
Subject: If the value is null in VelocityContext, the object is displayed 
same in Template...Can we get blank?


>
> 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


Mime
View raw message