Package io.jmix.reports.annotation
Annotation Interface TemplateDef
@Target(TYPE)
@Retention(RUNTIME)
@Repeatable(RepeatableTemplateDef.class)
public @interface TemplateDef
Defines a template - element of the report structure.
This annotation can be used several times on the report class if it has several templates.
Additional associated logic can be declared by declaring a method annotated with
Model object is
TemplateDelegate.
Model object is
ReportTemplate.- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionUnique template code.Type of the output, it determines kind of the output content generated by reporting engine. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether the user should be able to choose the output type of report at runtime in UI.Additional parameters for custom output document rendering.Path to the file located on the classpath that contains template content.booleanWhether this template should be automatically used by document generation, unless user explicitly specifies other one.Optional file name pattern which will be used to generate the file name for the produced report.Table template definition forReportOutputType.TABLEoutput type.Template engine used to process contents of text templates.
-
Element Details
-
code
String codeUnique template code. Use it when referring to this template programmatically. -
outputType
ReportOutputType outputTypeType of the output, it determines kind of the output content generated by reporting engine. Output type should be consistent with the template file type.
-
-
-
isDefault
boolean isDefaultWhether this template should be automatically used by document generation, unless user explicitly specifies other one.- Default:
- false
-
alterableOutput
boolean alterableOutputWhether the user should be able to choose the output type of report at runtime in UI.- Default:
- false
-
custom
CustomTemplateParameters customAdditional parameters for custom output document rendering.- Default:
- @io.jmix.reports.annotation.CustomTemplateParameters
-
outputNamePattern
String outputNamePatternOptional file name pattern which will be used to generate the file name for the produced report. It can either be a constant string or contain a report parameter as a variable, for example,${header.authorName}.xlsx.- Default:
- ""
-
filePath
String filePathPath to the file located on the classpath that contains template content. Template files are typically put to theresourcessource root of the same module.- Default:
- ""
-
table
TemplateTableDef tableTable template definition forReportOutputType.TABLEoutput type.- Default:
- @io.jmix.reports.annotation.TemplateTableDef(bands={})
-
templateEngine
TemplateMarkupEngine templateEngineTemplate engine used to process contents of text templates. Used for HTML template files (with various output types).- Default:
- FREEMARKER
-