use of io.jmix.emailtemplates.entity.TemplateReport in project jmix by jmix-framework.
the class EmailTemplateAttachmentsFragment method createTemplateReport.
protected TemplateReport createTemplateReport(Report report) {
Report reloaded = reloadReport(report);
TemplateReport templateReport = dataManager.create(TemplateReport.class);
templateReport.setReport(reloaded);
templateReport.setEmailTemplate(emailTemplateDc.getItem());
templateReport.setParameterValues(new ArrayList<>());
return templateReport;
}
use of io.jmix.emailtemplates.entity.TemplateReport in project jmix by jmix-framework.
the class EmailTemplateAttachmentsFragment method attachedReportsDcOnItemChangeEvent.
@Subscribe(id = "attachedReportsDc", target = Target.DATA_CONTAINER)
protected void attachedReportsDcOnItemChangeEvent(InstanceContainer.ItemChangeEvent<TemplateReport> e) {
TemplateReport templateReport = e.getItem();
if (templateReport != null) {
parametersFragment.setTemplateReport(templateReport);
parametersFragment.createComponents();
attachmentGroup.setVisible(true);
} else {
parametersFragment.clearComponents();
attachmentGroup.setVisible(false);
}
}
Aggregations