[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    RE: #parse() directive
From:       dhaval.h.udani () orbitech ! co ! in
Date:       2003-04-21 14:44:40
[Download RAW message or body]

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.

Regards,

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



-----Original Message-----
From: nathan [mailto:nathan@esha.com]
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
is
> 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
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic