I have this form which i post to spring and I am trying to make it display the original value from the database before i posted the updated value whilst leaving the error message on the field if there is a validation error not the posted value. However nothing i do seems to work.
My post action looks like:
@RequestMapping(method=RequestMethod.POST)
public String updateValues(@ModelAttribute("values") @Valid ValueList, Errors errors, RedircetAttributes redirectAttributes){
if (errors.hasErrors()){
return VALUES_VIEW;
}
//Do update stuff
return VALUES_REDIRECT;
}