velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Sending values to a #parsed template...
Date Tue, 26 Nov 2002 19:56:48 GMT

I suggest to take a look into the log. I guess that your $element is invalid...
Also try adding a debugging output with

I also suggest to try the #local directive from
See usage embedded below (but also note that Vel must be configured
to know that it exists).

Geir, could the local directive be extended to take an empty set, and
herewith forcing all new variables into a nested context?


Rodrigo Reyes wrote:
> Hi
>     I am using the #parse directive and I need to pass some variables to the
> template which is being parsed. The code I am using is:
> #macro (FE_textline $element)
    #local( $label $description $name $value $size $maxlength )
>  #set($label = $element.getAttributeValue("label"))
>  #set($description = $element.getAttributeValue("description"))
>  #set($name = $element.getAttributeValue("name"))
>  #set($value = $element.getAttributeValue("value"))
>  #set($size = $element.getAttributeValue("size"))
>  #set($maxlength = $element.getAttributeValue("maxlength"))
>  #parse("$widgetsPath/FE_textline.html")
> #end
>     Still, the parsed template is not recognizing the variables. Am I doing
> something wrong here? Thanx...
> Rodrigo

:) Christoph Reck

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

View raw message