velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaetan Sheridan" <gsheri...@vds.ca>
Subject RE: Indirect access to a variable
Date Tue, 24 Aug 2004 13:52:15 GMT
Thanks,

That's exactly it.

Gaetan Sheridan

-----Original Message-----
From: Shinobu Kawai [mailto:shinobu@ieee.org] 
Sent: August 24, 2004 09:20
To: Velocity Users List
Subject: Re: Indirect access to a variable


Hi Gaetan,

> I am looking for a way to access the value of an Object put in the 
> Velocity context using a String containing its name:
>  
> #set ( $foo = "some value" )
> #set ( $bar = "foo" )
>  
> How can I use $bar to display "some value"
RenderTool is what you are seeking:
 
http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/too
ls/generic/RenderTool.html

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>



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




---------------------------------------------------------------------
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