List of usage examples for org.springframework.web.bind.support SessionStatus setComplete
void setComplete();
From source file:cherry.example.web.applied.ex10.AppliedEx12ControllerImpl.java
@Override public ModelAndView init(String redirTo, long id, Authentication auth, Locale locale, SitePreference sitePref, NativeWebRequest request, SessionStatus status) { status.setComplete(); return redirect(redirectOnInit(redirTo, id)).build(); }
From source file:csns.web.controller.MFTDistributionControllerS.java
@RequestMapping(value = "/department/{dept}/mft/distribution/edit", method = RequestMethod.POST) public String edit(@ModelAttribute("distribution") MFTDistribution distribution, @PathVariable String dept, SessionStatus sessionStatus) { distribution = mftDistributionDao.saveDistribution(distribution); sessionStatus.setComplete(); return "redirect:/department/" + dept + "/mft/distribution/view?id=" + distribution.getId(); }
From source file:cherry.example.web.applied.ex30.AppliedEx31ControllerImpl.java
@Override public ModelAndView completed(long id, Authentication auth, Locale locale, SitePreference sitePref, NativeWebRequest request, SessionStatus status) { status.setComplete(); AppliedEx31Form f = service.findById(id); shouldExist(f, AppliedEx31Form.class, id); return withoutView().addObject(f).build(); }
From source file:fr.unistra.di.metier.dip.ent.portal.portlets.aboutiframe.ConfigController.java
/** * on Form submit update preferences/* www .j av a 2 s.c o m*/ * @param request * @param response * @param form * @see ConfigDAO#saveFormData(ConfigForm, PortletPreferences) */ @RequestMapping(params = { "action=update", "submit" }) public void update(ActionRequest request, ActionResponse response, @ModelAttribute("form") ConfigForm form, SessionStatus status) { dao.saveFormData(form, request.getPreferences()); status.setComplete(); // exit CONFIG PortletMode to return to VIEW PortletMode try { response.setPortletMode(PortletConstants.PORTLET_MODE_VIEW); } catch (PortletModeException e) { // VIEW is always an allowed PortletMode } }
From source file:org.wallride.web.controller.admin.tag.TagSearchController.java
@RequestMapping(params = "query") public String search(@PathVariable String language, String query, Model model, SessionStatus sessionStatus, RedirectAttributes redirectAttributes) { sessionStatus.setComplete(); for (Map.Entry<String, Object> mapEntry : model.asMap().entrySet()) { redirectAttributes.addFlashAttribute(mapEntry.getKey(), mapEntry.getValue()); }/*ww w . ja v a2 s . c o m*/ String url = UriComponentsBuilder.fromPath("/_admin/{language}/tags/index").query(query) .buildAndExpand(language).encode().toUriString(); return "redirect:" + url; }
From source file:ru.trett.cis.controllers.DeviceTypeController.java
@RequestMapping(method = RequestMethod.POST) public String processForm(@ModelAttribute @Valid DeviceType deviceType, BindingResult result, SessionStatus status) { if (result.hasErrors()) return "devicetype/form"; inventoryService.update(deviceType); status.setComplete(); return "redirect:/devicetype/list"; }
From source file:org.wallride.web.controller.admin.article.ArticleSearchController.java
@RequestMapping(params = "query") public String search(@PathVariable String language, String query, Model model, SessionStatus sessionStatus, RedirectAttributes redirectAttributes) { sessionStatus.setComplete(); for (Map.Entry<String, Object> mapEntry : model.asMap().entrySet()) { redirectAttributes.addFlashAttribute(mapEntry.getKey(), mapEntry.getValue()); }/*from w ww .j a v a2s . c om*/ String url = UriComponentsBuilder.fromPath("/_admin/{language}/articles/index").query(query) .buildAndExpand(language).encode().toUriString(); return "redirect:" + url; }
From source file:org.wallride.web.controller.admin.page.PageSearchController.java
@RequestMapping(params = "query") public String search(@PathVariable String language, String query, Model model, SessionStatus sessionStatus, RedirectAttributes redirectAttributes) { sessionStatus.setComplete(); for (Map.Entry<String, Object> mapEntry : model.asMap().entrySet()) { redirectAttributes.addFlashAttribute(mapEntry.getKey(), mapEntry.getValue()); }/*from w ww . j av a 2 s. co m*/ String url = UriComponentsBuilder.fromPath("/_admin/{language}/pages/index").query(query) .buildAndExpand(language).encode().toUriString(); return "redirect:" + url; }
From source file:ru.trett.cis.controllers.HomeController.java
@RequestMapping(value = "/profile", method = RequestMethod.POST) public String save(@Valid @ModelAttribute User user, BindingResult result, SessionStatus session) { if (result.hasErrors()) return "home/profile"; inventoryService.save(user);//from w w w. j a v a 2 s.c o m session.setComplete(); return "redirect:/home/profile"; }
From source file:ru.trett.cis.controllers.DeviceBrandController.java
@RequestMapping(method = RequestMethod.POST) public String processForm(@ModelAttribute @Valid DeviceBrand deviceBrand, BindingResult result, SessionStatus status) { if (result.hasErrors()) return "devicebrand/form"; inventoryService.update(deviceBrand); status.setComplete(); return "redirect:/devicebrand/list"; }