コード例 #1
0
 @RequestMapping(
     value = "/add_crew",
     method = RequestMethod.POST,
     produces = {"text/html;charset=UTF-8"})
 public ModelAndView addAdv(
     @RequestParam(value = "crewName") String crewName,
     @RequestParam(value = "member1Name") String member1Name,
     @RequestParam(value = "member2Name") String member2Name,
     @RequestParam(value = "car") String car,
     @RequestParam(value = "reanimation") String reanimation,
     HttpServletRequest request,
     HttpServletResponse response) {
   Crew crew = new Crew(crewName, member1Name, member2Name, car, reanimation);
   crewManager.addCrew(crew);
   return new ModelAndView("crews_page", "crews", crewManager.listCrews());
 }
コード例 #2
0
 @RequestMapping(value = "/delete_crew")
 public ModelAndView deleteCrew(@RequestParam(value = "id") long id) {
   crewManager.deleteCrew(id);
   return new ModelAndView("crews_page", "crews", crewManager.listCrews());
 }