StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

FreeMarker issue #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. How can I use the xdocreport api with template engine set to FreeMarker?
2. IXDocReport report = 
XDocReportRegistry.getRegistry().loadReport(in,TemplateEngineKind.FreeMarker); 
3. Create Java model (Velocity = context <-> FreeMarker = hashMap)

What is the expected output? What do you see instead?
- .docx template with FreeMarker
- fr.opensagres.xdocreport.core.XDocReportException: Null template engine. Set 
template engine with IXDocReport#setTemplateEngine.

What version of the product are you using? On what operating system?
latest version on win7 using jdeveloper 11.1.1.4

Please provide any additional information below.

I can generate .docx file using FreeMarker but in the javacode I still have to 
use the velocity engine.
I wonder if there is a way to use the FreeMarker engine.

Thank you in advance.

Original issue reported on code.google.com by stefan.j...@gmail.com on 20 May 2011 at 9:44

GoogleCodeExporter commented 8 years ago
Hi Stefan,

XDocReport is modular so it's possible to choose your document kind : (odt, 
docx....) and template engine (Velocity, Freemarker...). The XDocReport works 
with discovery system (it's the name that we have choosen) to load XDocReport 
configuration (Velocity, Freemarker...), in other words, XDocReport 
configuration is done according JAR you set in your classpath.

Examples that you can download are done with velocity, so I think it's the 
reason that you have not Freemarker available. So to use Freemarker, you must 
add in your classpath :

1) add fr.opensagres.xdocreport.template.freemarker JAR which is teh XDocReport 
template engien implementation for Freemarker. 
2) add freemarker.jar

To get fr.opensagres.xdocreport.template.freemarker JAR you must wait the 
release of XDocReport or you can build XDocReport 
http://code.google.com/p/xdocreport/wiki/HowBuildXDocReport

Regards ANgelo

Original comment by angelo.z...@gmail.com on 10 Jun 2011 at 10:10

GoogleCodeExporter commented 8 years ago
Hi Stefan,

I have uploaded sample 
fr.opensagres.xdocreport.samples.docxandfreemarker-0.0.1-SNAPSHOT-sample.zip 
with DOCx+Freemarker at http://code.google.com/p/xdocreport/downloads/list

So now you can play with docx+Freemarker.
Hope you will like it.

Regards Angelo

Original comment by angelo.z...@gmail.com on 14 Jun 2011 at 8:01

GoogleCodeExporter commented 8 years ago
Hi Angelo,

Thank you very much for your help and support.
I managed to use the FreeMarker engine!

At this moment I am using xdocreport to design a template engine for a
notification service.
I like your project because it helps me creating mine.

Keep up the good work!

Original comment by stefan.j...@gmail.com on 15 Jun 2011 at 6:33

GoogleCodeExporter commented 8 years ago
cleanup

Original comment by pascal.leclercq on 10 Oct 2014 at 7:37