How can I pass arguments from the spring controller to the HTML without needing an http request (e.g. return "index") ?
I am implementing a Javascript script to verify which checkboxes (each one assigned to an entity) are checked after onClick method. After that the script holds an array of the IDs of the entities - selectedEntities. Then in the HTML I intend to print all the entites names, and other attributes. But I don't know how can I do that in the HTML. I am thinking of implementing something in the controller that is able to fetch the entity by the id like this:
entityID = entityRepo.getEntityID(id);
model.attribute("entityID", entityID);
And then in the HTML I would use the list of ids outputed by the Javascript as an input in the getEntityID(id) but how can I do that (I am also using Thymeleaf) and correctly implement that in the controller without an http request, as I intend to write the checked entites on a popup (not a new page).