I noticed that when a Form Submit happens, my handler method that captures a @Model object as a parameter does have a valid Model available to me, e.g.
public ModelAndView save(final HttpServletRequest request,
@ModelAttribute(MODEL_NAME) MyModel model,
BindingResult bindingResult)
But when I have a handler method corresponding to a URL redirect from a simple <a href="..">
button/link, e.g.
<a href="myController.do&function=add">
leading to
@RequestMapping(params = "function=add")
public ModelAndView add(final HttpServletRequest request,
@ModelAttribute(MODEL_NAME) MyModel model) throws Exception
in that case, the model object is NULL. The model wasn't carried through the request and made available to me in the handler method.
Is there a way to reexpose the model? I do have the same param in both methods, but in the 2nd one the "model" object is NULL.