velocity-user mailing list archives

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

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

I also suggest to try the #local directive from
http://cvs.apache.org/viewcvs/jakarta-velocity/whiteboard/geir/Local.java?rev=HEAD
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?

Saludos,
Christoph

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
> #end
> 
>     Still, the parsed template is not recognizing the variables. Am I doing
> something wrong here? Thanx...
> 
> Rodrigo

-- 
:) Christoph Reck


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