velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andres_arti...@manquehue.net
Subject Re: ${$foo}} How-to?
Date Tue, 07 Jan 2003 02:51:46 GMT
You are right,

Thanks 
>-- Mensaje Original --
>Reply-To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>Reply-To: "Claude Brisson" <claude@savoirweb.com>
>From: "Claude Brisson" <claude@savoirweb.com>
>To: "Velocity Users List" <velocity-user@jakarta.apache.org>,
>	<andres_artigas@manquehue.net>
>Subject: Re: ${$foo}}  How-to?
>Date: Fri, 3 Jan 2003 14:17:39 +0100
>
>
>I guess you did not  "Place a reference to your VelocityContext object
in
>the context" from the java side.
>
>You must have a java line like
>
>context.put("context",context);
>
>CloD
>----- Original Message ----- 
>From: <andres_artigas@manquehue.net>
>To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>Sent: vendredi 3 janvier 2003 13:44
>Subject: RE: ${$foo}} How-to?
>
>
>
>I am doing something wrong,
>
>I did:
>
>#set( $foo = "hello" )
>#set( $var1 = "$foo" )
>#set( $var2 = "foo" )
>
>$context.get("$var1") 
>$context.get("var1") 
>$context.get("$var2") 
>$context.get("var2") 
>
>Was rendered as:
>
>$context.get("$var1") $context.get("var1") $context.get("$var2") $context.get("var2")
>
>
>
>Thanks in advance
>
>
>>-- Mensaje Original --
>>Reply-To: "Velocity Users List" <velocity-user@jakarta.apache.org>
>>From: Curt Larock <clarock@intelidata.com>
>>To: 'Velocity Users List' <velocity-user@jakarta.apache.org>
>>Subject: RE: ${$foo}}  How-to?
>>Date: Thu, 2 Jan 2003 17:30:41 -0500 
>>
>>
>>Place a reference to your VelocityContext object in the context.  You
>>can then do:
>> $context.get("$var")
>>
>>-----Original Message-----
>>From: andres_artigas@manquehue.net [mailto:andres_artigas@manquehue.net]
>>Sent: Thursday, January 02, 2003 2:58 PM
>>To: velocity-user@jakarta.apache.org
>>Subject: ${$foo}} How-to?
>>
>>
>>Hi,
>>
>>  How can I get content of a variable where the variable name is stored
>>in another variable?
>>
>>Example:
>>
>> ## Begin vm file
>>
>> #set ( $foo = "Hi" )
>> #set ( $var = '$foo' )
>>
>> ## Using something like
>>
>> Foo value is ${${var}}
>>
>> ## end file
>>
>>I want to get 
>>
>> Foo value is Hi
>>
>>
>>Thanks in advance 
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:velocity-user-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail:
>><mailto:velocity-user-help@jakarta.apache.org>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>
>





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


Mime
View raw message