I'm trying to access an attribute of a Java
object but I can not get it. I have the controller where I create the object and add the data:
Email emailModel = new Email();
buildMailModel(emailModel);
Map<String, Object> root = new HashMap<>();
root.put("EmailModel", emailModel);
private static void buildMailModel(Email emailModel) {
List<ComponentBase> components = getComponents();
emailModel.setComponents(components);
emailModel.setDocument(getNewsDocument());
emailModel.setDestinataries(getDestinataries());
emailModel.setShippingConfiguration(getShippingConfiguration());
}
This creates the object with this structure:
Then I try to access the attribute title
in the .ftl
in the following way, but I do not get it:
${emailModel.document.title}