From d13d556260c1a664e9ec6121b7ed1eee2abcd106 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 24 Oct 2009 17:04:52 +0000 Subject: [PATCH] Polishing the Portlet sections of the reference manual. --- spring-framework-reference/src/portlet.xml | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/spring-framework-reference/src/portlet.xml b/spring-framework-reference/src/portlet.xml index c9e06979a9f..2e3affbd30b 100644 --- a/spring-framework-reference/src/portlet.xml +++ b/spring-framework-reference/src/portlet.xml @@ -118,7 +118,13 @@ container(s) that Spring Portlet MVC uses. These bean scopes are described in detail in - + + +
@@ -141,7 +148,7 @@ Like ordinary portlets, the DispatcherPortlet is declared in the - portlet.xml of your web application: + portlet.xml file of your web application: sample @@ -163,8 +170,8 @@ WebApplicationContext, which inherits all the beans already defined in the Root WebApplicationContext. These inherited - beans can be overridden in the portlet-specific scope, and new scope- - specific beans can be defined local to a given portlet instance. + beans can be overridden in the portlet-specific scope, and new + scope-specific beans can be defined local to a given portlet instance. The framework will, on initialization of a DispatcherPortlet, look for a file named @@ -260,8 +267,8 @@ multipart handling). An appropriate handler is searched for. If a handler - is found, the execution chain associated with the handler (pre- - processors, post-processors, controllers) will be executed in order + is found, the execution chain associated with the handler + (pre-processors, post-processors, controllers) will be executed in order to prepare a model. If a model is returned, the view is rendered, using @@ -274,7 +281,7 @@ - Exceptions that might be thrown during processing of the request + Exceptions that are thrown during processing of the request get picked up by any of the handler exception resolvers that are declared in the WebApplicationContext. Using these exception resolvers you can define custom behavior in case @@ -312,15 +319,14 @@ indicate where context(s) can be found. The String is potentially split up into multiple Strings (using a comma as a delimiter) to support multiple contexts (in - case of multiple context locations, of beans that are + case of multiple context locations, for beans that are defined twice, the latest takes precedence). namespace The namespace of the WebApplicationContext. - Defaults to [portlet-name]- - portlet. + Defaults to [portlet-name]-portlet. viewRendererUrl @@ -339,7 +345,7 @@ The rendering process in Portlet MVC is a bit more complex than in Web MVC. In order to reuse all the view technologies - from Spring Web MVC), we must convert the + from Spring Web MVC, we must convert the PortletRequest / PortletResponse to HttpServletRequest / @@ -403,7 +409,7 @@ Controllers The controllers in Portlet MVC are very similar to the Web MVC - Controllers and porting code from one to the other should be + Controllers, and porting code from one to the other should be simple. The basis for the Portlet MVC controller architecture is the @@ -430,14 +436,14 @@ Controller interface requires two methods that handle the two phases of a portlet request: the action request and the render request. The action phase should be capable of handling an - action request and the render phase should be capable of handling a + action request, and the render phase should be capable of handling a render request and returning an appropriate model and view. While the Controller interface is quite abstract, - Spring Portlet MVC offers a lot of controllers that already contain a - lot of the functionality you might need – most of these are very similar + Spring Portlet MVC offers several controllers that already contain a + lot of the functionality you might need; most of these are very similar to controllers from Spring Web MVC. The Controller interface just defines the - most common functionality required of every controller - handling an + most common functionality required of every controller: handling an action request, handling a render request, and returning a model and a view.