I have this thymeleaf template and its an email template : https://jsfiddle.net/7dj1ekv8/
Data from the database that I am able to pull successfully using spring data JPA:
I am pulling data from oracle database using below code. I then 'setProps' for the mail and I am able to pull data successfully and show in the email. For eaxmple, I am able to pull employee name using th:text ="emloyeeNameIstRow" :
public void dataMapperSecond(Mail mail) throws MessagingException, IOException {
Iterable<Employee> employeeDetails = RepositoryObj.findAll();
for (Employee fetcher : employeeDetails) {
System.out.println(fetcher.getID());
}
List<Employee> fetcherByAsList = RepositoryObj.findAll();
String appName = fetcherByAsList.get(0).getemployeeName();
System.out.println("The name of the app is : "+employeeName);
Map<String, Object> model = new HashMap<String, Object>();
model.put("AlldataAsList", fetcherByAsList);
model.put("emloyeeNameIstRow", employeeName);
model.put("type", "TRANSACTIONAL");
mail.setProps(model);
System.out.println("data from the hashmap from data Mapper second:" + model);
emailService.sendEmail(mail);
log.info("END... Sending Inlined CSS Email with dynamic data");
}
My question :
In this(https://jsfiddle.net/7dj1ekv8/) thymeleaf template, Rather than pulling data for each data cell, how can I pull data all at once and loop to show the data in the thymeleaf template for each row. I want the expand icon i.e. ">" from first row of the thymeleaf to be visible after pulling the data as its clickable. Thanks in advance.