tag:blogger.com,1999:blog-3237724005744642470.post7529039007706706558..comments2020-05-08T12:31:27.297+01:00Comments on Captain Debug's Blog: Using Spring MVC’s @ModelAttribute AnnotationRoger Hugheshttp://www.blogger.com/profile/07042290171112551665[email protected]Blogger9125tag:blogger.com,1999:blog-3237724005744642470.post-28938741441501393832013-05-10T19:30:05.691+01:002013-05-10T19:30:05.691+01:00David, I don&#39;t think that the source for this...David, <br />I don&#39;t think that the source for this project is available; however, if you search for captaindebug on GitHub, you&#39;ll find lots of sample projects for other blogs on Spring.Roger Hugheshttps://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-22369192840198962962013-05-10T11:52:00.428+01:002013-05-10T11:52:00.428+01:00Locks great. I wanted to do something like this as...Locks great.<br />I wanted to do something like this as a starting project. Since I&#39;m a beginner with Spring MVC it would be a great help to have the example as a complete example project. Specially with all the classes to see how they interact.<br />Can you provide something like this?David[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-70400517655979884892013-04-10T10:07:18.137+01:002013-04-10T10:07:18.137+01:00In the addUser Mehod the ModelAttribute should be ...In the addUser Mehod the ModelAttribute should be &quot;User&quot; rather than &quot;user&quot;Ishan[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-14765714746846083662012-09-26T07:05:14.805+01:002012-09-26T07:05:14.805+01:00Is it possible to have a @ModelAttribute with not-...Is it possible to have a @ModelAttribute with not-required id field and populate it when accessing a @ResourceMapping method via ajax request? <br /><br />I have a list of items on my page and I would like to fetch the data asynchronously when clicked on an item. The ajax call is catched with @ResourceMapping method with that item&#39;s id. But I don&#39;t seem to get the data on form however I try.TKirahvihttps://www.blogger.com/profile/08851948402812981582[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-59460057939917492042011-11-18T02:41:29.346+00:002011-11-18T02:41:29.346+00:00Thx for the great comment. It&#39;s very helpful.Thx for the great comment. It&#39;s very helpful.Seungho Seohttps://www.blogger.com/profile/02765401058955975640[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-54274480127348093402011-11-16T09:07:50.617+00:002011-11-16T09:07:50.617+00:00To clarify this point... the addUser(...) method...To clarify this point... <br /><br />the addUser(...) method is the second request handler method annotated by @RequestMapping. <br /><br />If a call is made to any method in the AddUserController class with the @RequestMapping annotation, then the populateUser() method is called first. In the case of a call to addUser(...), you don&#39;t need the User object returned by the populateUser(...) method. Hence, in a real world scenario, you just may suffer an unnecessary performance degradation, especially if populateUser() has to read default values from a database.<br /><br />Hope that helps.Roger Hugheshttps://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-28911406779179044562011-11-14T22:11:40.119+00:002011-11-14T22:11:40.119+00:00I&#39;m confused which method is second one that y...I&#39;m confused which method is second one that you mentioned &quot;the second request handler method call doesn’t need the new user...&quot;.<br />If you say createForm(), I think createForm need new user for every request.Seungho Seohttps://www.blogger.com/profile/02765401058955975640[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-70313466184383498162011-11-05T13:22:58.173+00:002011-11-05T13:22:58.173+00:00Ooops. Now corrected.Ooops. Now corrected.Roger Hugheshttps://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-14196821089733747572011-11-05T12:41:16.375+00:002011-11-05T12:41:16.375+00:00Good example, but you are using addAddress in your...Good example, but you are using addAddress in your code instead of addUser.Anonymous[email protected]