Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. @Controller
  2. @RequestMapping(value = "/dialog")
  3. public class DialogController {
  4.  
  5. @RequestMapping(value = "/redirected.view")
  6. public ModelAndView redirected() {
  7. System.out.println( "DialogController.redirected()" );
  8. final ModelAndView mav = new ModelAndView( "redirected" );
  9. return mav;
  10. }
  11.  
  12. @RequestMapping(value = "/form.view")
  13. public Object form() {
  14. System.out.println( "DialogController.form()" );
  15. return createModel();
  16. }
  17.  
  18. private ModelAndView createModel() {
  19. final ModelAndView mav = new ModelAndView( "redirect:redirected.view" );
  20. return mav;
  21. }
  22.  
  23. }
  24.  
  25. @RequestMapping(value = "/search.form", method = RequestMethod.POST)
  26. public Object submit( @Valid @ModelAttribute("sequentialSearch") final SequentialSearchData searchObject,
  27. final BindingResult bindingResult, final Model model, final HttpSession session ) throws Exception {
  28. ...
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement