From: Juergen H. <jho...@us...> - 2007-12-30 20:46:16
|
Update of /cvsroot/springframework/spring/docs/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10486/docs/reference/src Modified Files: mvc.xml Log Message: added clarification on @ModelAttribute/@RequestMapping execution order Index: mvc.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/mvc.xml,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** mvc.xml 18 Nov 2007 20:25:21 -0000 1.93 --- mvc.xml 30 Dec 2007 20:46:11 -0000 1.94 *************** *** 3699,3702 **** --- 3699,3711 ---- the <classname>@RequestMapping</classname> annotation.</para> + <para><emphasis>Note:</emphasis> <classname>@ModelAttribute</classname> + annotated methods will be executed <emphasis>before</emphasis> the + chosen <classname>@RequestMapping</classname> annotated handler method. + They effectively pre-populate the implicit model with specific attributes, + often loaded from a database. Such an attribute can then already be + accessed through <classname>@ModelAttribute</classname> annotated + handler method parameters in the chosen handler method, potentially + with binding and validation applied to it.</para> + <para>The following code snippet shows these two usages of this annotation:</para> |