Code example for ModelAndView

Methods: getModel

0
 
    Topic message = messageDao.getById(msgid); 
 
    checkUncommitable(message); 
 
    ModelAndView mv = new ModelAndView("uncommit"); 
    mv.getModel().put("message", message); 
    mv.getModel().put("preparedMessage", prepareService.prepareTopic(message, request.isSecure(), tmpl.getCurrentUser())); 
 
    return mv; 
  } 
 
  @RequestMapping(value="/uncommit.jsp", method=RequestMethod.POST) 
  public ModelAndView uncommit( 
    HttpServletRequest request, 
    @RequestParam int msgid 
  ) throws Exception { 
    Template tmpl = Template.getTemplate(request); 
 
    if (!tmpl.isModeratorSession()) { 
Experience pair programming with AI  Get Codota for Java