You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Marc Lustig <ma...@marclustig.com> on 2003/02/19 10:26:45 UTC

AW: velocity issue

thanks Ritesh, I had another look into the Velocity manual.
It says $!var works only if $var is not set at all.
It does not work if $var is set to null. In that case the easiest way is:
#set($v="")
#if($var!=null)
#set($v=$var)
#end

> -----Ursprüngliche Nachricht-----
> Von: Ritesh Radhakrishnan [mailto:Ritesh_R@infosys.com]
> Gesendet: Mittwoch, 19. Februar 2003 06:43
> An: mail@marclustig.com
> Betreff: RE: velocity issue
>
>
> hi,
>    I am not sure if this is the problem but as far as i know
> $!var dosent work.it has to be written as !$var. it is equivalent
> to !($var).
>
> i write the code as
>
> #if(!$var)
>  #set($v=$var)
> #else
>   #set($v=="")
> #end
>
>
> hope that solves the problem.
>
> regards,
> Warm Regards,
> Ritesh Radhakrishnan
>
>
>
>


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