Closed GoogleCodeExporter closed 9 years ago
Freemarker can be configured for that
http://freemarker.sourceforge.net/docs/pgui_config_errorhandling.html#autoid_44
but I don't know if it's easy to configure that for XDocReport.
Velocity doesn't throw exception in this case.Perhaps you could switch to
Velocity.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 7 Mar 2013 at 12:41
Hi,
Thank.
http://freemarker.org/docs/api/freemarker/template/class-use/TemplateExceptionHa
ndler.html
It should be possible to change the configuration with something near :
inputStream from docx
IXDocReport finalDocument =
XDocReportRegistry.getRegistry().loadReport(inputStream,
TemplateEngineKind.Freemarker);
DocxTemplateEngineConfiguration configuration =
(DocxTemplateEngineConfiguration)
finalDocument.getTemplateEngine().getConfiguration();
configuration.setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER);
finalDocument.getTemplateEngine().setConfiguration(configuration);
Issue :
Can't cast to Configuration from ITemplateEngineConfiguration/DocxTemplateEngineConfiguration and setTemplateExceptionHandler is only for freemarker Configuration
Original comment by LudoFe...@gmail.com
on 7 Mar 2013 at 11:03
to configure template engine you need to create your
ITemplateEngineInitializerDiscovery
Pleases read my comments at
https://code.google.com/p/xdocreport/issues/detail?id=68#c2
(it's for Velocity log, but you can adapt it for Freemarker. If it works could
you please attach your code in this issue, thank's).
Regards Angelo
Original comment by angelo.z...@gmail.com
on 7 Mar 2013 at 2:49
See https://code.google.com/p/xdocreport/wiki/FreemarkerTemplate to customize
Freemarker template engine.
Original comment by angelo.z...@gmail.com
on 18 Feb 2014 at 1:49
Original issue reported on code.google.com by
LudoFe...@gmail.com
on 6 Mar 2013 at 4:35