'Hi folks, Can someone help me with thymeleaf, how to get multiple object(say Address Object)?

I am using springboot 2.6.0 version, thymeleaf framework as view template and Spring MVC pattern.

I have Profile object -> profile has list of address .I am confused how to get multiple address object from thymeleaf template.

can someone help? Below is code snippet:

public class DoctorProfileModel {

    private String email;

    private String dateOfBirth;

    private String gender;

    private String dateOfJoining;

    private String specialization;

    private List<QualificationModel> qualification;

    private List<AddressModel> addresses;

    private String phoneNumber;

    //getter and Setters


}

I want to bind one of my html page for updating the profile's address and qualification.

I am getting confused what to do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source