@RequestMapping("new") public String create(Model model) { model.addAttribute("visita", new Visita()); model.addAttribute("mascotas", mascotaDAO.all()); model.addAttribute("veterinarios", veterinarioDAO.all()); return "comercial/atencion/visitaForm"; }
@RequestMapping("update/{id}") public String update(@PathVariable("id") Long id, Model model) { Visita vis = visitaDAO.find(new Visita(id)); model.addAttribute("visita", vis); model.addAttribute("mascotas", mascotaDAO.all()); model.addAttribute("veterinarios", veterinarioDAO.all()); return "comercial/atencion/visitaForm"; }