velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: #parse() directive
Date Mon, 21 Apr 2003 14:32:40 GMT
Hi all,

Seems like more people are in favour of the #eval approach. Can someone tell me 
how I can contribute to the Velocity project by including this new directive 
amongst its standard set. i.e. how do i make it part of the project once I have 
written the code and all.


Dhaval Udani
Senior Analyst
M-Line, QPEG
OrbiTech Solutions Ltd.
+91-22-28290019 Extn. 1457

-----Original Message-----
From: nathan []
Sent: Monday, April 21, 2003 7:40 PM
To: velocity-user
Cc: nathan
Subject: Re: #parse() directive

Dhaval said:
> #set( $labelCounter = 1 )
> $Label$labelCounter
> Now I put a value for "Label1" in the Context (say "testID")
> I want Velocity to render the above VTL as "testID". However at present it
> rendering it as :
> $Label1
> Can someone tell me how to achieve the same?

at present you should use the RenderTool or ViewRenderTool found in the
velocity-tools project.  it is for situations like this that those tools
were written.

> I am also waiting for suggestions with respect to the directive vis-a-vis
> ResourceLoader approach that I had brought up last week. Do let me know.

I agree with Christoph.  A ResourceLoader for turning strings into Template
objects seems unnecessary and "hackish".   IMHO, the proper solution is to
either write an #eval directive or to use one of the already written and
supported tools.

Nathan Bubna

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

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

View raw message