logo       

Re: Sending values to a #parsed template...: msg#00189

jakarta.velocity.user

Subject: Re: Sending values to a #parsed template...

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise