List of usage examples for org.springframework.web.bind.support SessionStatus setComplete
void setComplete();
From source file:cherry.example.web.basic.ex50.BasicEx51ControllerImpl.java
@Override public ModelAndView init(String redirTo, BasicEx50to51Form form, BindingResult binding, Authentication auth, Locale locale, SitePreference sitePref, NativeWebRequest request, SessionStatus status) { if (StringUtils.isNotEmpty(redirTo)) { status.setComplete(); return redirect(redirectTo(redirTo)).build(); }//from w ww. j ava 2 s .com if (binding.hasErrors()) { status.setComplete(); return redirect(redirectToSearchResult()).build(); } BasicEx51SessionForm f = createSessionForm(form); return redirect(redirectToStart()).addObject(f).build(); }
From source file:abm.jakaria.school.ResultController.java
@RequestMapping(value = "/saveResult", method = RequestMethod.POST) public String create(@ModelAttribute("newResult") Result result, BindingResult rresult, SessionStatus status) { validator.validate(result, rresult); if (rresult.hasErrors()) { return "newResult"; }//from w w w .ja v a 2s . c o m resultDao.save(result); status.setComplete(); return "redirect:viewAllResult.do"; }
From source file:abm.jakaria.school.ResultController.java
@RequestMapping(value = "/updateResult", method = RequestMethod.POST) public String update(@ModelAttribute("editResult") Result result, BindingResult rresult, SessionStatus status) { validator.validate(result, rresult); if (rresult.hasErrors()) { return "editResult"; }/*w w w.j av a 2 s .c om*/ resultDao.update(result); status.setComplete(); return "redirect:viewAllResult.do"; }
From source file:abm.jakaria.school.StudentController.java
@RequestMapping(value = "/saveStudent", method = RequestMethod.POST) public String create(@ModelAttribute("newStudent") Student student, BindingResult result, SessionStatus status) { validator.validate(student, result); if (result.hasErrors()) { return "newStudent"; }/*from ww w . jav a2 s .c o m*/ studentDao.save(student); status.setComplete(); return "redirect:viewAllStudent.do"; }
From source file:abm.jakaria.school.StudentController.java
@RequestMapping(value = "/updateStudent", method = RequestMethod.POST) public String update(@ModelAttribute("editStudent") Student student, BindingResult result, SessionStatus status) { validator.validate(student, result); if (result.hasErrors()) { return "editStudent"; }/*from w w w .j a va 2 s . co m*/ studentDao.update(student); status.setComplete(); return "redirect:viewAllStudent.do"; }
From source file:abm.jakaria.school.EmployeeController.java
@RequestMapping(value = "/saveEmployee", method = RequestMethod.POST) public String create(@ModelAttribute("newEmployee") Employee employee, BindingResult result, SessionStatus status) { validator.validate(employee, result); if (result.hasErrors()) { return "newEmployee"; }//from w w w .j av a 2 s . c o m employeeDao.save(employee); status.setComplete(); return "redirect:viewAllEmployee.do"; }
From source file:abm.jakaria.school.CommiteeController.java
@RequestMapping(value = "/saveCommitee", method = RequestMethod.POST) public String create(@ModelAttribute("newCommitee") Commitee commitee, BindingResult result, SessionStatus status) { validator.validate(commitee, result); if (result.hasErrors()) { return "newCommitee"; }//from w w w.ja va2 s. co m commiteeDao.save(commitee); status.setComplete(); return "redirect:viewAllCommitee.do"; }
From source file:org.parancoe.basicwebappevolution.controllers.PersonController.java
@RequestMapping(method = { RequestMethod.PUT, RequestMethod.POST }) public String store(@ModelAttribute("person") @Valid Person person, BindingResult result, SessionStatus status, HttpServletRequest req) {/*from www .j a v a2s . co m*/ if (result.hasErrors()) { return "person/edit"; } else { personDao.store(person); status.setComplete(); logger.info("Stored the person (" + person + ")"); FlashHelper.setRedirectNotice(req, "The person data have been stored."); return "redirect:"; } }
From source file:abm.jakaria.school.EmployeeController.java
@RequestMapping(value = "/updateEmployee", method = RequestMethod.POST) public String update(@ModelAttribute("editEmployee") Employee employee, BindingResult result, SessionStatus status) { validator.validate(employee, result); if (result.hasErrors()) { return "editEmployee"; }// www .j a va 2 s . com employeeDao.update(employee); status.setComplete(); return "redirect:viewAllEmployee.do"; }
From source file:abm.jakaria.school.CommiteeController.java
@RequestMapping(value = "/updateCommitee", method = RequestMethod.POST) public String update(@ModelAttribute("editCommitee") Commitee commitee, BindingResult result, SessionStatus status) { validator.validate(commitee, result); if (result.hasErrors()) { return "editCommitee"; }// w ww . j av a2s.c o m commiteeDao.update(commitee); status.setComplete(); return "redirect:viewAllCommitee.do"; }