Spring MVC for portlets, request lifecycle

Does anyone know where to get the documentation on Spring request lifecycle for App portlet (Annotation based Spring controller?

I need to know the order in which Spring methods are called and the parameters (request, model, ...) available at each step of the request processing.

Basic question: when the @ModelAttribute methods are called (I want to see the full picture, not just the "after this, before this" which I already got through debugging)

Thank you very much!

+2


a source to share


2 answers


If you see the Spring documentation about Portlet MVC, you won't find a clear picture (a real picture of strings and fields) of its workflow, but at the beginning of the MVC Web Framework Chapter , you have a rough picture of the different stages of the lifecycle. Portlet MVC introduces some additional functionality to Web MVC, but basically works the same as Web MVC.



What the Spring Portlet represents more is the render phase after the action phase, which modifies the database and renders the business layer stuff, while the render phase handles what actually appears on the display.

0


a source


@ModelAttribute methods are called prior to the action phase, which precedes the render phase. So, for example, on the @ActionMapping method, where the model is a form support object, the @ModelAttribute annotated method will be called to initialize the model, then the request model will be used to update it with anything the user has changed.This is convenient as it saves you have to manually find the model before saving it.



0


a source







All Articles