That all explains the two usages that I understand (including the return-value one I didn't mention), however it still doesn't address the usage that is confusing to me.
I'll cite a code excerpt from an article I recently read, at http://blog.jteam.nl/2009/05/14/simp...pring-mvc-2-5/ :
Code:
@ModelAttribute(“user”)
public User formBackingObject(Long id) {
if (id != null) {
return userDao.findById(id);
}
return new User();
}
This method takes a single "Long id" parameter. When this method is called just before the @RequestMapping-annotated method, where is it going to get the "id" value from to send to this method? I see that the method checks for a NULL value. Perhaps this is called under two different circumstances?