velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: dynamic property names?
Date Tue, 03 Aug 2004 15:00:02 GMT
Matthew Van Horn said:
> Can you use dynamic property names in Velocity?
> I mean something like:
> #set($foo = "xyzzy")
> the value of $foo is $myObject.$foo
> where that resolves to $myObject.getXyzzy()

no.  you can't do this without using a tool like the RenderTool or
ViewRenderTool in the VelocityTools project.

> I'm going to check this via trial and error, but any help is
> appreciated, and might save me some time and trouble.

Nathan Bubna

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

View raw message