Create a Template from database

2 messages Options
Embed this post
Permalink
Jeremy Chone-2

Create a Template from database

Reply Threaded More More options
Print post
Permalink
How do I create a Template without a name. Some of the templates are
not from the file system and therefore does not really have a name,
however, all the Template contrustors take a name.

Am I missing something?

Thank you

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Daniel Dekany

Re: Create a Template from database

Reply Threaded More More options
Print post
Permalink
Tuesday, September 22, 2009, 9:40:59 PM, Jeremy Chone wrote:

> How do I create a Template without a name. Some of the templates are
> not from the file system and therefore does not really have a name,
> however, all the Template contrustors take a name.
>
> Am I missing something?

That a template has a name doesn't mean that it has to be a file name.
The name is just something that resembles to an URL path that
*somehow* (and you tell how) identify the template. It even can be
something totally meaningless. Yet, I recommend you to use something
meaningful for the template name, like the primary key (or other
unique filed) of the record where the template is stored. This will
help if you have an error, as you will know which template is it
about. Also if you implement the actual name resolution via
TemplateLoader (see Configuration.setTemplateLoader), so FreeMarker
can retrieve templates by name, then its template caching facility can
be used, plus templates will be able to #include/#import each other.

> Thank you

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user