#Spring and Javascript

5 messages · Page 1 of 1 (latest)

copper perch
#

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).

hexed galleonBOT
#

This post has been reserved for your question.

Hey @copper perch! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

hexed galleonBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

hexed galleonBOT
#

<@&765578700724371486>

Requested by tils#7872