Hello, I am creating a website using java language and spring MVC framework + Thymeleaf for view. In my DB I have a table which has a self referencing (hierarchal), I have a table for employees which contains an employee Id and for each employee there is a manager Id.. so an employee can be a manager for other employees. Also from this table I created a view, it contains emplyeeId, managerId, and the name from another table. Now I have an entity (mapping the view) //setters and getters } In my controller I send this line to my html page ( What I want now is, a tree view with checkboxes in my html page to show the managers and the employees under them, only show managers and when the box is checked other employees will be shown with checkboxes like a tree. Could any expert help me by give me a clear html code and explaination.