Paul Middelkoop opened SPR-4753 and commented
Consider the following method signature:
@RequestMapping(params = "action=submitAndPreview", method = RequestMethod.POST)
public void submitAndPreview(
@SuppressWarnings("unused") @ModelAttribute(BasicController.ATTRIBUTE_ENTITY) Item item,
@ModelAttribute(ItemNodeController.ATTRIBUTE_NODE) ItemNode node,
@RequestParam("languageId") Integer languageId,
HttpSession session,
BindingResult result
Writer responseWriter) {
When calling thus methid I got the exception "java.lang.IllegalStateException: Errors/BindingResult argument declared without preceding model attribute. Check your handler method signature!"
After playing around with the method signature I noticed that the @RequestParam parameter results in this exception. When I remove this parameter or move it to the end of the parameter list it works.
Affects: 2.5.3
Issue Links:
Paul Middelkoop opened SPR-4753 and commented
Consider the following method signature:
@RequestMapping(params = "action=submitAndPreview", method = RequestMethod.POST)public void submitAndPreview(
@SuppressWarnings("unused")@ModelAttribute(BasicController.ATTRIBUTE_ENTITY) Item item,@ModelAttribute(ItemNodeController.ATTRIBUTE_NODE) ItemNode node,@RequestParam("languageId") Integer languageId,HttpSession session,
BindingResult result
Writer responseWriter) {
When calling thus methid I got the exception "java.lang.IllegalStateException: Errors/BindingResult argument declared without preceding model attribute. Check your handler method signature!"
After playing around with the method signature I noticed that the
@RequestParamparameter results in this exception. When I remove this parameter or move it to the end of the parameter list it works.Affects: 2.5.3
Issue Links:
@ModelAttribute, two commands, BindingResult