Hi Jason,

> Maybe I'm crazy, but here is an idea.  When using a template variable
> which happens to be an array or list as a scalar, instead of using
> toString() as the value, use the first item's toString().  If I have a
> string array of size one under key 'name', ${name} will be replaced
> with, say, "[Ljava.lang.String;@4dd1b".  Which is useful only insofar as
> it tells me, the template author, that I need to use #foreach.

When there's a will, there's a way.  You can create a custom
ReferenceInsertionEventHandler to get the desired behaviour.
  
http://jakarta.apache.org/velocity/developer-guide.html#EventCartridge%20and%20Event%20Handlers

Best regards,
-- Shinobu

--
Shinobu Kawai <[EMAIL PROTECTED]>

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

Reply via email to