Ciao Antonio,

Awesome! this is exactly what I was looking for but could not find the match 
from problem description => feature name in google ;)

Saluti!
Giovanni

-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petre...@gmail.com] 
Sent: Wednesday, October 06, 2010 12:31 PM
To: Velocity Users List
Subject: Re: automatic fill of unspecified placeholders?

2010/10/6 Azùa Giovanni (KSXK 12) <giovanni.a...@credit-suisse.com>:
> I have a large template with many placeholders. According to some rules, the 
> application populates several of these attributes to the context and leave 
> some unspecified. I would like that the unspecified ones ( i.e. 
> velocityContext.get("placeholderA") == null ) become empty Strings "" ... I 
> researched the Velocity API but could not find any provision for this 
> use-case something like callback if unspecified.
>
> Can anyone point me to the way to achieve this with Velocity?

Wouldn't it be easier with the quiet reference notation?
http://velocity.apache.org/engine/releases/velocity-1.6.4/user-guide.html#quietreferencenotation

Antonio

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


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

Reply via email to