if (result.hasErrors()) {
model.addAttribute("recommendation", recommendationFormBean);
return "recommendations/update";
}
Recommendation foundRec = findRecommendation(userId, recommendationFormBean.getId());
foundRec.rate(recommendationFormBean.getRating(), recommendationFormBean.getComments());
model.addAttribute("itemId", recommendationFormBean.getId());
return "redirect:/recommendations/" + recommendationFormBean.getId();
}
@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)