velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <>
Subject Re: Clearing content for dynamically constructed variables - Urgent
Date Fri, 17 Sep 2004 14:29:05 GMT
Hi Ravikanth,

> i construced the variable with the following syntax
> $render.recurse($ctx, '\#set($$name = "$theValue")' )

> Now the problem is...
> I have this construction of variable in a macro which
> i will be using recursively for processing the
> hierarchy. For the top most level, it is able to
> create the dynamic variables and assign the value. But
> for all sub level hierarchy items, value of $id is not
> getting replaced with proper value. It is still taking
> the value of the top level $id. I checked that the
> $theValue is not returning null or empty String ("")
> for child elements.  I am struck at this point. If
> anyone knows the solution for this, kindly let me
> know.
That is strange.  Can you provide minimal code that shows what is not
working?  In my environment,
    #set($name = "id")
    #set($theValue = "Hello")
    $render.recurse($ctx, '\#set($$name = "$theValue")')
    #set($theValue = "World")
    $render.recurse($ctx, '\#set($$name = "$theValue")')
works perfectly fine, and says Hello World.

Best regards,
-- Shinobu Kawai

Shinobu Kawai(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message