0

I want to display data which i am getting from my db in a view. As far as i know, in case i set my objects in the model defined as @ModelAtttibute, the user will be able to manipulate the data. For example: if my model has the attribute "firstname", the user will be able to manipulate the value by accessing the attribute over a get parameter(...?firstname=blabla)

In this case the model attribute is used for displaying data and not for processing user input and accodingly i dont want the user to overwrite values.

Has anyone any solutions/pattern for solving this problem?

  • Post your code, explain what it's supposed to do, and what the problem is. I don't even understand why you would use ModelAttribute to get data from the DB and put it in the model. – JB Nizet Jun 29 '17 at 22:02
  • Which part didn't you understand? The point is that the user/client is able to modify the model independently how i fill my model. – TheGringott Jun 30 '17 at 11:56
  • I don't understand why you refuse to post your code when asking for help. – JB Nizet Jun 30 '17 at 14:11
  • Because it's a general question and it has nothing to do with my code – TheGringott Jul 05 '17 at 08:48

0 Answers0