-
Notifications
You must be signed in to change notification settings - Fork 374
FieldsMetadataTemplate
FieldsMetadata is used to manage lazy loop tables, images and text styling.
Ex:
FieldsMetadata metadata = report.createFieldsMetadata();
metadata.addFieldAsImage("logo", "project.Logo");
@FieldMetadata gives you the capability to manage metadata with annotations:
- description
- syntax for text styling
Alternatively to
https://code.google.com/p/xdocreport/wiki/ODTReportingJavaMainHTMLTextStyling
or
https://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainHTMLTextStyling
Users can easily configure threw fieldmetadata annotation :
@FieldMetadata(syntaxKind="Html", description="HTML Formatted long text")
public String getComment() {
return comment;
}
Imagine you have the Project Pojo :
public class Project {
private final String name;
public Project(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
and you wish to display the name of the project with Html syntax.
// 1) Create FieldsMetadata
FieldsMetadata fieldsMetadata = report.createFieldsMetadata();
// 2) Set name as Html syntax
fieldsMetadata.addFieldAsTextStyling("project.Name", SyntaxKind.Html);
Add @FieldMetadata in the Pojo class
@FieldMetadata(syntaxKind="Html", description="HTML text")
public String getName() {
return name;
}
Load fields metadata to use information from the @FieldMetadata :
// 1) Create FieldsMetadata
FieldsMetadata fieldsMetadata = report.createFieldsMetadata();
// 2) Load fields metadata from Java Class
fieldsMetadata.load("project", Project.class);
- Overview
- Getting Started
- FAQ
- Which License Applies
- Download
- Developer's Guide
- User's Guide
- Contributor's Guide
- Acknowledgment
- Articles
- Releases