You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Charles N. Harvey III" <ch...@alloy.com> on 2005/02/22 21:29:28 UTC

default silent notation

Hello there.
Quick question.  Is there any way to change some setting in 
velocity.properties
that will make it so that "silent" notation is the default?

By default, "$myVar" always shows up on the page when the value is 
null.  Which
is usually fine.  But, sometimes, I want it to not appear.  The same as 
"$!myVar".

Any way to have this set system wide?

Thanks a lot.


Charlie


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


Re: default silent notation

Posted by Shinobu Kawai <sh...@gmail.com>.
Hi Charlie,

> Quick question.  Is there any way to change some setting in
> velocity.properties
> that will make it so that "silent" notation is the default?
> 
> By default, "$myVar" always shows up on the page when the value is
> null.  Which
> is usually fine.  But, sometimes, I want it to not appear.  The same as
> "$!myVar".
> 
> Any way to have this set system wide?

Check out EventCartridges and ReferenceInsertionEventHandler.
   http://jakarta.apache.org/velocity/developer-guide.html#EventCartridge%20and%20Event%20Handlers
You should be able to configure all null to be inserted as blank.  ;)

Best regards,
-- Shinobu

--
Shinobu Kawai <sh...@gmail.com>

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