You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Madasu, Satya K." <Sa...@mcleodusa.com> on 2005/03/18 18:16:31 UTC

Problem with null in velocity template

Hi,

If I have a null value to the variable then the script is displaying as is
with the $ sign on the web page.

How to overcome this problem? Please let me know.

We are using $project $name to render this.

When I passed in null for project and velocity for name then the result is

We are using $project velocity to render this.


Thanks!

Kiron Madasu
McLeodUSA StarQuality Certified
Software Development Analyst
Phone: 319-790-7591
E-mail: smadasu@mcleodusa.com
Website: http://www.mcleodusa.com






NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named.  Any use, copying
or disclosure by any other person is strictly prohibited. If you have
received this transmission in error, please notify the sender via e-mail.




Re: Problem with null in velocity template

Posted by Tarun Narang <ta...@secf.com>.
hi barbara

u can use $!project instead of using $project if this variable has a null
value.

Regards
Ktarun

----- Original Message ----- 
From: "Barbara Baughman" <ba...@utdallas.edu>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Saturday, March 19, 2005 12:24 AM
Subject: Re: Problem with null in velocity template


> Read the User's Guide, under Quiet Reference Notation.
>
> Barbara Baughman
> X2157
>
> On Fri, 18 Mar 2005, Madasu, Satya K. wrote:
>
> > Hi,
> >
> > If I have a null value to the variable then the script is displaying as
is
> > with the $ sign on the web page.
> >
> > How to overcome this problem? Please let me know.
> >
> > We are using $project $name to render this.
> >
> > When I passed in null for project and velocity for name then the result
is
> >
> > We are using $project velocity to render this.
> >
> >
> > Thanks!
> >
> > Kiron Madasu
> > McLeodUSA StarQuality Certified
> > Software Development Analyst
> > Phone: 319-790-7591
> > E-mail: smadasu@mcleodusa.com
> > Website: http://www.mcleodusa.com
> >
> >
> >
> >
> >
> >
> > NOTICE: This electronic mail transmission may contain confidential
> > information and is intended only for the person(s) named.  Any use,
copying
> > or disclosure by any other person is strictly prohibited. If you have
> > received this transmission in error, please notify the sender via
e-mail.
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
>




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


Re: Problem with null in velocity template

Posted by Barbara Baughman <ba...@utdallas.edu>.
Read the User's Guide, under Quiet Reference Notation.

Barbara Baughman
X2157

On Fri, 18 Mar 2005, Madasu, Satya K. wrote:

> Hi,
>
> If I have a null value to the variable then the script is displaying as is
> with the $ sign on the web page.
>
> How to overcome this problem? Please let me know.
>
> We are using $project $name to render this.
>
> When I passed in null for project and velocity for name then the result is
>
> We are using $project velocity to render this.
>
>
> Thanks!
>
> Kiron Madasu
> McLeodUSA StarQuality Certified
> Software Development Analyst
> Phone: 319-790-7591
> E-mail: smadasu@mcleodusa.com
> Website: http://www.mcleodusa.com
>
>
>
>
>
>
> NOTICE: This electronic mail transmission may contain confidential
> information and is intended only for the person(s) named.  Any use, copying
> or disclosure by any other person is strictly prohibited. If you have
> received this transmission in error, please notify the sender via e-mail.
>
>
>
>

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


RE: Problem with null in velocity template

Posted by Tanveer Dhillon <ta...@secf.com>.
use the variable as $!sign ur problem will be removed

-----Original Message-----
From: Madasu, Satya K. [mailto:Satya.Madasu@mcleodusa.com]
Sent: Friday, March 18, 2005 10:47 PM
To: 'velocity-user@jakarta.apache.org'
Subject: Problem with null in velocity template


Hi,

If I have a null value to the variable then the script is displaying as is
with the $ sign on the web page.

How to overcome this problem? Please let me know.

We are using $project $name to render this.

When I passed in null for project and velocity for name then the result is

We are using $project velocity to render this.


Thanks!

Kiron Madasu
McLeodUSA StarQuality Certified
Software Development Analyst
Phone: 319-790-7591
E-mail: smadasu@mcleodusa.com
Website: http://www.mcleodusa.com






NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named.  Any use, copying
or disclosure by any other person is strictly prohibited. If you have
received this transmission in error, please notify the sender via e-mail.







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