Spring-Boot + Thymeleaf, load data in Bootstrap modal window

0

Good afternoon! I'm using spring-boot and thymeleaf to develop a java application, I'd like to know how I can load logs into the modal bootstrap window by clicking the link in the table that lists the logs.

Example: In the user query screen, I have 3 view, edit, delete buttons. The preview button will only load the data of the selected user in the modal window, not allowing editing. The edit button will do the same, but will allow the user to edit the data by the form. What is the best way to do this? Thanks for any help, I'm starting now and I'm a bit lost. Hugs!

    
asked by anonymous 10.04.2017 / 22:19

1 answer

1

If you are using bootstrap there is an event called show.bs.modal , it is fired every time a modal appears, so you can build something within your modal by clicking the buttons in your table.

You can make a javascript so

$("SeuModal").on("show.bs.modal",function(){
    //coloque seu codigo aqui

});
    
16.10.2017 / 20:33