@RequestMapping(value = "/showReports", method = RequestMethod.POST) public String addReport(@ModelAttribute("report") Report report, ModelMap model) { model.addAttribute("issueid", report.getIssueid()); model.addAttribute( "release", report.getRelease()); // NEEDS TO BE CHANGED TO ACCEPT AN OBJECT OF A RELEASE CLASS model.addAttribute("title", report.getTitle()); model.addAttribute("description", report.getDescription()); model.addAttribute("type", report.getType()); return "showReports"; }
@RequestMapping(value = "/showReports", method = RequestMethod.GET) public String showReports(@ModelAttribute("report") Report report, ModelMap model) { report.setIssueid("Issue #10"); report.setRelease("Juno"); report.setTitle("Minimize button is broken"); report.setDescription("Minimize button does not ...."); report.setType("Bug"); model.addAttribute("issueid", report.getIssueid()); model.addAttribute( "release", report.getRelease()); // NEEDS TO BE CHANGED TO ACCEPT AN OBJECT OF A RELEASE CLASS model.addAttribute("title", report.getTitle()); model.addAttribute("description", report.getDescription()); model.addAttribute("type", report.getType()); return "showReports"; }