Advertisement
Guest User

Untitled

a guest
Mar 29th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. @RequestMapping(value = {"/sentencemanagement.*"}, method = RequestMethod.POST)
  2.     public String sentenceManagement_postRequest(@ModelAttribute SentenceModelAttribute sentenceModelAttribute , Model model, HttpServletRequest request, HttpServletResponse response) throws Exception
  3.     {
  4.         if(request.getParameter("cancel") != null)
  5.         {
  6.             response.sendRedirect("screenmanagement.htm");
  7.             return "sentencemanagementscreen";
  8.         }
  9.         else
  10.         {
  11.             model.addAttribute("sentenceID", Long.valueOf(sentenceModelAttribute.getId()));
  12.             response.sendRedirect("sentenceedit.htm");
  13.             return "sentencemanagementscreen";
  14.         }
  15.     }
  16.  
  17. @ModelAttribute("sentenceModelAttribute")
  18.     public SentenceModelAttribute createSentenceModelAttribute()
  19.     {
  20.         return new SentenceModelAttribute();
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement