velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Williams <>
Subject Map creation outside of #set
Date Mon, 11 Apr 2005 17:32:05 GMT

I am buiding something similar in spirit to Rails
Unfortunately, Java is not so elegant when it comes to writing the
HTML templates. Enter Velocity.

I really need the ability to define a Map outside of a #set. For instance:

    $'', { 'onChange' : 'doSomethingCool()',
'style' : 'color: red' })

Right now, with what is in cvs (when is 1.5 going to be released,
btw?), as far as I can tell, I have to do this:

    #set($attrs = { 'onChange' : 'doSomethingCool()', 'style' : 'color: red' })
    $'', $attrs)


Please tell me I am wrong. I looked at the Velocity source, and I am
99.9% certain that I am not. How hard would it be to get this? Maybe
the real question should be, why doesn't Velocity have this already?

  adam williams

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message