コード例 #1
0
 @RequestMapping("/delete/performer/{performerId}")
 public String deletePerformer(
     @PathVariable("performerId") Long performerId, Map<String, Object> map) {
   try {
     taskManagerFacade.removePerformer(performerId);
   } catch (PerformerException e) {
     return "error404";
   }
   map.put("statusValues", PerformerStatus.values());
   map.put("typeValues", PerformerType.values());
   map.put("performerVO", new PerformerVO());
   try {
     map.put("performerList", taskManagerFacade.getAllPerformers());
   } catch (PerformerException e) {
     return "error404";
   }
   return "redirect:/index";
 }
コード例 #2
0
 @RequestMapping(value = "/add/performer", method = RequestMethod.POST)
 public String addPerformer(
     @ModelAttribute("performer") PerformerVO performerVO, Map<String, Object> map) {
   try {
     taskManagerFacade.addPerformer(performerVO);
   } catch (PerformerException e) {
     return "error404";
   }
   map.put("statusValues", PerformerStatus.values());
   map.put("typeValues", PerformerType.values());
   map.put("performerVO", new PerformerVO());
   try {
     map.put("performerList", taskManagerFacade.getAllPerformers());
   } catch (PerformerException e) {
     return "error404";
   }
   return "redirect:/index";
 }
コード例 #3
0
  @RequestMapping("/update/performer")
  public String updatePerformer(@ModelAttribute("task") PerformerVO performerVO) {

    try {
      taskManagerFacade.updatePerformer(performerVO);
    } catch (PerformerException e) {
      return "error404";
    }

    return "redirect:/index";
  }
コード例 #4
0
  @RequestMapping("/edit/performer/{performerId}")
  public String editPerformer(
      @PathVariable("performerId") Long performerId, Map<String, Object> map) {

    try {
      PerformerVO performerVO = taskManagerFacade.getPerformer(performerId);
      map.put("statusValues", PerformerStatus.values());
      map.put("typeValues", PerformerType.values());
      map.put("performerVO", performerVO);
    } catch (PerformerException e) {
      return "error404";
    }
    return "edit_performer";
  }