if (request.getParameter("cansel") != null) {
return new ModelAndView("redirect:/lookThickness.html");
}
Thickness thickness = (Thickness) command;
if (thickness.getThicknessId() != null) {
thicknessManager.update(thickness);
if (thickness.isEdited()) {
return new ModelAndView("redirect:updating.html?id=" + thickness.getThicknessId() + "&fieldId=" + request.getParameter("fieldId"));
}
return new ModelAndView("redirect:/lookThickness.html");
} else {
thicknessManager.insert(thickness);
if (thickness.isEdited()) {
return new ModelAndView("redirect:updating.html?id=" + thickness.getThicknessId() + "&fieldId=" + request.getParameter("fieldId"));
}
mav.addObject("thickness", new Thickness());
mav.addObject("result", Integer.valueOf(1));
return mav;
}