Friday, June 9, 2017, 12:19:02 AM, Daniel Dekany wrote:
[snip]
> DefaultTemplateResolver happens to support them. If
> Configuration.templateLoader is set to `new MyTemplateResolver()`, and
I meant "If Configuration.templateResolver is set to `new
MyTemplateResolver()`" of course...
--
Thanks,
Now this mechanism is working in FM3. At the end I did this:
http://freemarker.org/builds/fm3/api/freemarker-core/org/apache/freemarker/core/templateresolver/TemplateResolver.html
Explanation: If you implement a custom TemplateResolver, then you are
required to declare which of the Configuration
Note that there's quick draft of TemplateResolver committed in the "3" branch:
https://github.com/apache/incubator-freemarker/blob/3/src/main/java/org/apache/freemarker/core/templateresolver/TemplateResolver.java
It's not integrated with the other parts of FM (it's assumed
everywhere that we have
Thursday, February 16, 2017, 5:33:01 PM, David E Jones wrote:
> On Thu, 2017-02-16 at 15:56 +0100, Daniel Dekany wrote:
>> Thursday, February 16, 2017, 6:17:00 AM, David E Jones wrote:
>>
>> >
>> > This is cleaner, more obvious what's going on underneath, but since
>> > the
On Thu, 2017-02-16 at 15:56 +0100, Daniel Dekany wrote:
> Thursday, February 16, 2017, 6:17:00 AM, David E Jones wrote:
>
> >
> > This is cleaner, more obvious what's going on underneath, but since
> > the DefaultTemplateResolver will be the most commonly used you
> > could just leave the
Thursday, February 16, 2017, 6:17:00 AM, David E Jones wrote:
>
> This is cleaner, more obvious what's going on underneath, but since
> the DefaultTemplateResolver will be the most commonly used you
> could just leave the current setting methods as they are and just
> document that if you set a
This is cleaner, more obvious what's going on underneath, but since the
DefaultTemplateResolver will be the most commonly used you
could just leave the current setting methods as they are and just document that
if you set a different TemplateResolver they will be
ignored.
-David
On Wed,
An interesting consequence of introducing the TemplateResolver concept
is that it the earlier top-level configuration settings, like
templateLoader, templateLookupStrategy, templateNameFormat,
cacheStorage, and templateUpdateDelayMillisecond should now be the
settings (JavaBean properties) of
I have only had the chance to look it on my phone, so have not read the thread
thoroughly.
I will go through it on my desktop later today.
--Roberto
Sent from Yahoo Mail on Android
On Tue, Feb 7, 2017 at 8:14 AM, Daniel Dekany wrote:
In case you have missed it in the
In case you have missed it in the other thread, note that it seems
that there won't be a new alternative TemplateLoader interface in FM2,
so this will have to be solved with the existing TemplateLoader there.
--
Thanks,
Daniel Dekany
Wednesday, January 25, 2017, 4:17:10 AM, Roberto Benitez
Tuesday, February 7, 2017, 7:40:18 AM, David E Jones wrote:
> On Tue, 2017-01-24 at 23:47 +0100, Daniel Dekany wrote:
>>
>> Should the TemplateResolver-s (the work name for the new interface)
>> still get the template name already resolved to absolute and
>> normalized? So when cfg.getTemplate
Wednesday, January 25, 2017, 4:17:10 AM, Roberto Benitez wrote:
>>Also, I hope that freemarker-datasource-loader can be simplified over
>>time, so it doesn't employ this many interfaces/classes.
>
> Currently, the only essential classes are:
> 1) JdbcMetaData --A central place to store DB
>Also, I hope that freemarker-datasource-loader can be simplified over
>time, so it doesn't employ this many interfaces/classes.
Currently, the only essential classes are: 1)JdbcMetaData --A central place to
store DB table/column names. 2) TemplateSourceDao --to perform the JDBC/CRUD
work 3)
Tuesday, January 24, 2017, 9:27:37 PM, David E Jones wrote:
> On Jan 24 2017, at 10:25 am, Daniel Dekany wrote:
>
>> Tuesday, January 24, 2017, 6:48:16 PM, David E Jones wrote:
>
>>
>
>> > but all other Configuration.getTemplate() methods call this method
>
>>
>
>> > so it
On Jan 24 2017, at 10:25 am, Daniel Dekany wrote:
> Tuesday, January 24, 2017, 6:48:16 PM, David E Jones wrote:
>
> > but all other Configuration.getTemplate() methods call this method
>
> > so it is an easy way to override all Template loading (assuming you
>
Tuesday, January 24, 2017, 6:48:16 PM, David E Jones wrote:
> A simpler TemplateLoader would be helpful.
>
>
>
> One approach I've used to simplify it is to override all loading by creating
> an object that extends the freemarker.template.Configuration and override this
> method:
>
>
>
>
A simpler TemplateLoader would be helpful.
One approach I've used to simplify it is to override all loading by creating
an object that extends the freemarker.template.Configuration and override this
method:
Template getTemplate(final String name, Locale locale, Object
Tuesday, January 24, 2017, 6:27:38 AM, Roberto Benitez wrote:
> I am working on a TemplateLoader implementation that loads from a
> database. From a previous e-mail with Daniel Dekany, he mentioned
> that this is something you still need, and may be interested in integrating.
> I have the source
I am working on a TemplateLoader implementation that loads from a database.
From a previous e-mail with Daniel Dekany, he mentioned that this is something
you still need, and may be interested in integrating.
I have the source code on github: rbenitez22/freemarker-datasource-loader
||
19 matches
Mail list logo