velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Colebatch" <...@colebatch.com>
Subject RE: How can I construct a reference from a value?...
Date Sun, 08 Jun 2003 00:56:51 GMT
I would try making a tool that showed the name of all the things in the
context.

Having said that, what you're trying to do sounds ridiculous without some
example of what you're doing it for.... could you elaborate a bit?

cheers
dim

ps - I dont consider myself to be a velocity expert.

> -----Original Message-----
> From: Horwitz Steve [mailto:stevehorwitz@yahoo.com]
> Sent: Sunday, 8 June 2003 1:14 AM
> To: velocity-user@jakarta.apache.org
> Subject: How can I construct a reference from a value?...
>
>
> Dear Velocity Experts,
>
>   I would like to construct the name of a reference
>   from within a template.  Is there a way of doing
>   this?
>
>   For example, consider the following Velocity
>   template code.
>
>                #set( $a = "a" )
>                #set( $b = "b" )
>                #set( $ab = "3" )
>                #set( $p = "$a$b" )
>
>   The value of p will be output as "ab".  What I
>   would like is to use the value of p as the *name*
>   of the reference.  This would allow me to output
>   $ab which has the value "3".
>
>   I've experimented a bit without any luck.  It
> doesn't
>   look like the functionality is there.  Can you
>   suggest a way of doing this?
>
>   I am using NVelocity, the C# version of Velocity.
>
>                                     Thank you,
>
>                                     Steve Horwitz
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
> ---------------------------------------------------------------------
> 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