yeah, use quiet notation if you don't want such warnings.  the idea is
that any reference that is value-less and not expected to possibly be
null (i.e. not specified with $!quiet), must be an error, because the
template designer must be expecting it to have a value.

On Wed, 26 Jan 2005 19:56:21 +0000 (UTC), Shankar Banerjee
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> We are using velocity to do our javascript generation on the server side. We
> are facing this problem which I am sure many of you have already faced.
> Whenever the velocity template engine encounters a context variable whose
> value is null, it generates the following exception e.g.:
> 
> 11:15:58,283 INFO  [Engine] StandardContext[/CServer] Velocity   [warn]
> org.apac
> he.velocity.runtime.exception.ReferenceException: reference : template
> = /pages/
> Site.vm [line 283,column 28] : $metadata.columnName is not a valid reference.
> 
> But more importantly, it actually substitutes the context variable as the
> value in the html\javascript content.
> 
> My question is is this actually a bug ? or this is a default behavior which
> can changed by configuration ? In either case what is the solution.
> Specifically for us its not acceptable to get the context variable itself
> being put as the substituted value, as we are not only displaying it on the UI
> but also using it back from the UI on the server as metadata for the next
> request.
> 
> I would appreciate your reply.
> 
> Thanks
> --Shankar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to