Ejemplo n.º 1
0
 @SuppressWarnings("finally")
 @RequestMapping(value = "/delete/id/{idReg}", method = RequestMethod.GET)
 public String deleteExamination(
     @PathVariable Long idReg, Model model, RedirectAttributes redirectAttrs) {
   try {
     Register reg = serviceregister.getRegisterById(idReg);
     serviceregister.removeRegister(reg);
     redirectAttrs.addFlashAttribute("info", "registro.delete");
   } catch (RegisterNoExistException e) {
     redirectAttrs.addFlashAttribute("error", e.getMessage());
   } catch (Exception e) {
     redirectAttrs.addFlashAttribute("error", "registro.noborrar");
   } finally {
     return "redirect:/acme/admin/register/";
   }
 }
Ejemplo n.º 2
0
 @ModelAttribute("allRegisters")
 public List<Register> getAllCertifications() {
   return serviceregister.getAllRegisters();
 }