Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EventDetails/WebContent/WEB-INF/insertMonth.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<h2>Spring's form select, option, options example</h2>
<form:form method="POST" action="/EventDetails/SubmitMonth">
<form:errors path="*" cssClass="errorblock" element="div" />

<table>

<tr>
Expand All @@ -37,4 +37,4 @@
</table>
</form:form>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,14 @@ public ModelAndView welcome() {
}

@RequestMapping("/InsertMonth")
public ModelAndView createUserWelcome(@ModelAttribute("command") Event_detailsBean edBean, BindingResult result) {
public ModelAndView createUserWelcome(@ModelAttribute("command") Event_detailsBean edBean) {
return new ModelAndView("insertMonth");
}

@RequestMapping(value = "/SubmitMonth", method = RequestMethod.POST)
public ModelAndView createUser(@RequestParam("month") Integer month, BindingResult bindingResult) {

if (bindingResult.hasErrors()) {
System.out.println("Binding Errors are present...");
return new ModelAndView("redirect:/ViewEvents");
}
public ModelAndView createUser(@RequestParam("month") Integer month) {


// get n stored month in month variable

System.out.println(month);
Expand Down Expand Up @@ -91,4 +88,4 @@ private void initModelList(Model model) {

}
*/
}
}