velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
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
nathan@esha.com


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


Mime
View raw message