velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Obtaining a Template from a specific resource loader ???
Date Sun, 10 Mar 2002 22:44:07 GMT
On 3/10/02 5:45 PM, "mraruba" <mraruba@aaahawk.com> wrote:

> Hi 
> I would like to use a specific ResourceLoader to obtain a Template from
> my Runtime environment variable even though I may have multiple resource
> loaders defined in the properties file.
> 
> For example I want to do the following:
> template = Velocity.getTemplate
> (templateFile,RuntimeConstants.ENCODING_DEFAULT,"file");
> 
> Or
> 
> template = Velocity.getTemplate
> (templateFile,RuntimeConstants.ENCODING_DEFAULT,"database");
> 
> Besides the current cpability
> 
> template = Velocity.getTemplate
> (templateFile,RuntimeConstants.ENCODING_DEFAULT);
> 
> The current implementation does not provide this capability or allow me
> to extend and create my own Runtime environment todo so. Is there a
> reason for this ?

Yes.  The thinking behind the resource management is that you should be able
to write your applications independent of the configuration of the resource
loaders, so that way they can be switched beneath you w/o harm.

We are going to add some additional functionality to v1.4 regarding resource
loading, so your suggestion might be something for us to look at for that.

> 
> If I wanted to add this capability to the current release and check this
> in, how would I go about doing this ?

You could offer a patch with the functionality if you wish to...

geir

> 
> Thanks
> 
> Gerry
> 
> "One Thread to rule them all, One Thread to find them, One Thread to
> bring them all and in the darkness bind them!"
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



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