How to show a confirmation message after checking in Servlet?

Asked

Viewed 244 times

0

Good afternoon, you guys! By clicking the Change button, I perform a check to see if the data in the database remains the same. How do I return a confirmation window if the results are not the same?

Example: I select the material I want to change, fill in the inputs, but before clicking Change, I leave the table for some reason, and another user, on another computer, changes this same material. When I go back and click Change, check the data, how do I show a message stating that the data has been changed and asking if I still want to change it?

Thanks in advance :)

1 answer

0

You would have to save the current status of the object at the beginning of the Ex transaction:

When starting the change flow, you put the obj to be changed in json format in the view in a Hidden something like this to then validate it again in the back-end...

If your object is saved has date and time of change, you can simply set this field to Hidden and validate if it is equal to the changed but this way you will not know what has changed.

  • Blz friend, but my question really is: after performing the validation, how to send this information to the jsp and open a window stating that it has been changed and asking if you still want to change... this is what is getting.... the validation is already quiet... Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.