Esempio n. 1
0
 @RequestMapping(
     value = "/project",
     params = {"id"},
     method = RequestMethod.GET)
 public @ResponseBody Project getProject(HttpServletRequest req) {
   final Long rowId = Long.valueOf(req.getParameter("id"));
   Project editedProject = projectService.findProject(rowId);
   return editedProject;
 }
Esempio n. 2
0
 @RequestMapping(value = "/project", method = RequestMethod.POST)
 public String saveProject(Project project, BindingResult bindingResult) {
   projectService.saveProject(project);
   return "redirect:project";
 }
Esempio n. 3
0
 @RequestMapping(value = "/project", method = RequestMethod.GET)
 public String getProjects(Model model) {
   model.addAttribute("projects", projectService.getProjects());
   return "project";
 }