velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravikanth.L" <ravikanth_lo...@yahoo.com>
Subject Re: constructing variable names dynamically
Date Wed, 25 Aug 2004 13:10:30 GMT
Hi Shinobu Kawai,

 Thanks for your code. I think I have some syntax
problem.

i tried with the following code

 \\ in my java code 
  context.put("element","name");
  context.put("elementValue","Ravi");

 i want to create a variable with name $name and its
value should be "Ravi"

\\in my template i tried like this:
 
 render.recurse("#set($$element = $elementValue)")
 Hello $name // as my template already using $name to
display name.

I tried with eval function also. No luck. 

Could you please correct me.

With Regards,
Ravikanth.L


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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