Polishing the Portlet sections of the reference manual.
This commit is contained in:
parent
642549a1e7
commit
d13d556260
|
|
@ -119,6 +119,12 @@
|
||||||
in detail in <xref linkend="beans-factory-scopes-other"/></para>
|
in detail in <xref linkend="beans-factory-scopes-other"/></para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
As of Spring 3.0.0.RC1, the PetPortal sample application is not
|
||||||
|
included in the Spring distribution. Thus the following note is
|
||||||
|
commented out until further notice.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
<note>
|
<note>
|
||||||
<para>The Spring distribution ships with a complete Spring Portlet MVC
|
<para>The Spring distribution ships with a complete Spring Portlet MVC
|
||||||
sample application that demonstrates all of the features and functionality
|
sample application that demonstrates all of the features and functionality
|
||||||
|
|
@ -126,6 +132,7 @@
|
||||||
in the <filename class="directory">'samples/petportal'</filename> directory of
|
in the <filename class="directory">'samples/petportal'</filename> directory of
|
||||||
the full Spring distribution.</para>
|
the full Spring distribution.</para>
|
||||||
</note>
|
</note>
|
||||||
|
-->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="portlet-dispatcher">
|
<section id="portlet-dispatcher">
|
||||||
|
|
@ -141,7 +148,7 @@
|
||||||
|
|
||||||
<para>Like ordinary portlets, the
|
<para>Like ordinary portlets, the
|
||||||
<classname>DispatcherPortlet</classname> is declared in the
|
<classname>DispatcherPortlet</classname> is declared in the
|
||||||
<literal>portlet.xml</literal> of your web application:</para>
|
<literal>portlet.xml</literal> file of your web application:</para>
|
||||||
|
|
||||||
<programlisting language="xml"><![CDATA[<portlet>
|
<programlisting language="xml"><![CDATA[<portlet>
|
||||||
<portlet-name>sample</portlet-name>
|
<portlet-name>sample</portlet-name>
|
||||||
|
|
@ -163,8 +170,8 @@
|
||||||
<interfacename>WebApplicationContext</interfacename>, which inherits all
|
<interfacename>WebApplicationContext</interfacename>, which inherits all
|
||||||
the beans already defined in the Root
|
the beans already defined in the Root
|
||||||
<interfacename>WebApplicationContext</interfacename>. These inherited
|
<interfacename>WebApplicationContext</interfacename>. These inherited
|
||||||
beans can be overridden in the portlet-specific scope, and new scope-
|
beans can be overridden in the portlet-specific scope, and new
|
||||||
specific beans can be defined local to a given portlet instance.</para>
|
scope-specific beans can be defined local to a given portlet instance.</para>
|
||||||
|
|
||||||
<para>The framework will, on initialization of a
|
<para>The framework will, on initialization of a
|
||||||
<classname>DispatcherPortlet</classname>, look for a file named
|
<classname>DispatcherPortlet</classname>, look for a file named
|
||||||
|
|
@ -260,8 +267,8 @@
|
||||||
multipart handling).</para></listitem>
|
multipart handling).</para></listitem>
|
||||||
|
|
||||||
<listitem><para>An appropriate handler is searched for. If a handler
|
<listitem><para>An appropriate handler is searched for. If a handler
|
||||||
is found, the execution chain associated with the handler (pre-
|
is found, the execution chain associated with the handler
|
||||||
processors, post-processors, controllers) will be executed in order
|
(pre-processors, post-processors, controllers) will be executed in order
|
||||||
to prepare a model.</para></listitem>
|
to prepare a model.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If a model is returned, the view is rendered, using
|
<listitem><para>If a model is returned, the view is rendered, using
|
||||||
|
|
@ -274,7 +281,7 @@
|
||||||
|
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
||||||
<para>Exceptions that might be thrown during processing of the request
|
<para>Exceptions that are thrown during processing of the request
|
||||||
get picked up by any of the handler exception resolvers that are
|
get picked up by any of the handler exception resolvers that are
|
||||||
declared in the <interfacename>WebApplicationContext</interfacename>.
|
declared in the <interfacename>WebApplicationContext</interfacename>.
|
||||||
Using these exception resolvers you can define custom behavior in case
|
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
|
indicate where context(s) can be found. The String is
|
||||||
potentially split up into multiple Strings (using a
|
potentially split up into multiple Strings (using a
|
||||||
comma as a delimiter) to support multiple contexts (in
|
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).</entry>
|
defined twice, the latest takes precedence).</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>namespace</literal></entry>
|
<entry><literal>namespace</literal></entry>
|
||||||
<entry>The namespace of the
|
<entry>The namespace of the
|
||||||
<interfacename>WebApplicationContext</interfacename>.
|
<interfacename>WebApplicationContext</interfacename>.
|
||||||
Defaults to <literal>[portlet-name]-
|
Defaults to <literal>[portlet-name]-portlet</literal>.</entry>
|
||||||
portlet</literal>.</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>viewRendererUrl</literal></entry>
|
<entry><literal>viewRendererUrl</literal></entry>
|
||||||
|
|
@ -339,7 +345,7 @@
|
||||||
|
|
||||||
<para>The rendering process in Portlet MVC is a bit more complex than in
|
<para>The rendering process in Portlet MVC is a bit more complex than in
|
||||||
Web MVC. In order to reuse all the <link linkend="view">view technologies</link>
|
Web MVC. In order to reuse all the <link linkend="view">view technologies</link>
|
||||||
from Spring Web MVC), we must convert the
|
from Spring Web MVC, we must convert the
|
||||||
<interfacename>PortletRequest</interfacename> /
|
<interfacename>PortletRequest</interfacename> /
|
||||||
<interfacename>PortletResponse</interfacename> to
|
<interfacename>PortletResponse</interfacename> to
|
||||||
<interfacename>HttpServletRequest</interfacename> /
|
<interfacename>HttpServletRequest</interfacename> /
|
||||||
|
|
@ -403,7 +409,7 @@
|
||||||
<title>Controllers</title>
|
<title>Controllers</title>
|
||||||
|
|
||||||
<para>The controllers in Portlet MVC are very similar to the Web MVC
|
<para>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.</para>
|
simple.</para>
|
||||||
|
|
||||||
<para>The basis for the Portlet MVC controller architecture is the
|
<para>The basis for the Portlet MVC controller architecture is the
|
||||||
|
|
@ -430,14 +436,14 @@
|
||||||
<interfacename>Controller</interfacename> interface requires two methods
|
<interfacename>Controller</interfacename> interface requires two methods
|
||||||
that handle the two phases of a portlet request: the action request and
|
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
|
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
|
render request and returning an appropriate model and view. While the
|
||||||
<interfacename>Controller</interfacename> interface is quite abstract,
|
<interfacename>Controller</interfacename> interface is quite abstract,
|
||||||
Spring Portlet MVC offers a lot of controllers that already contain a
|
Spring Portlet MVC offers several controllers that already contain a
|
||||||
lot of the functionality you might need – most of these are very similar
|
lot of the functionality you might need; most of these are very similar
|
||||||
to controllers from Spring Web MVC. The
|
to controllers from Spring Web MVC. The
|
||||||
<interfacename>Controller</interfacename> interface just defines the
|
<interfacename>Controller</interfacename> 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
|
action request, handling a render request, and returning a model and a
|
||||||
view.</para>
|
view.</para>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue