Permalink
Browse files

Add @ModelAttribute to ajaxRequest argument.

  • Loading branch information...
1 parent b1c4b3d commit 0d4e00bd7e7554c3adb906cd1bf2b46fce284edd @rstoyanchev rstoyanchev committed Nov 8, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/springframework/samples/mvc/form/FormController.java
@@ -38,8 +38,9 @@ public void form() {
}
@RequestMapping(method=RequestMethod.POST)
- public String processSubmit(@Valid FormBean formBean, BindingResult result, boolean ajaxRequest,
- Model model, RedirectAttributes redirectAttrs) {
+ public String processSubmit(@Valid FormBean formBean, BindingResult result,
+ @ModelAttribute("ajaxRequest") boolean ajaxRequest,
+ Model model, RedirectAttributes redirectAttrs) {
if (result.hasErrors()) {
return null;
}

0 comments on commit 0d4e00b

Please sign in to comment.