SWF-1160 - Apache Trinidad ajax requests (PPR) don't work.

This commit is contained in:
Jeremy Grelle
2009-08-05 23:18:57 +00:00
parent fe86e080c1
commit ad32048843
2 changed files with 15 additions and 0 deletions

View File

@@ -796,6 +796,11 @@
well together has not yet been attempted, but Trinidad provides a pretty thorough solution on its own
when used in conjunction with the Spring Faces integration layer.
</para>
<para>
NOTE - An <code>AjaxHandler</code> implementation for Trinidad is not currently provided out-of-the-box with
Spring Faces. In order to fully integrate with Trinidad's PPR functionality, a custom implementation should be
provided. An community-provided partial example can be found here: <ulink url="http://jira.springsource.org/browse/SWF-1160">SWF-1160</ulink>
</para>
<para>
Typical Trinidad + Spring Faces configuration is as follows in web.xml (in addition to the typical
Spring Faces configuration):

View File

@@ -164,6 +164,16 @@
Ajax request should not differ from a standard browser request, thus no special knowledge of an Ajax request
is needed directly in the code and the same hanlder can be used for both styles of request.
</para>
<sect2 id="custom-ajax-handler">
<title>Providing a Library-Specific AjaxHandler</title>
<para>
The key interface for integrating various Ajax libraries with the Ajax-aware behavior of Web Flow (such as not redirecting for a
partial page update) is <code>org.springframework.js.AjaxHandler</code>. A <code>SpringJavascriptAjaxHandler</code> is configured by default that is able to
detect an Ajax request submitted via the Spring JS client-side API and can respond appropriately in the case where a redirect is required. In
order to integrate a different Ajax library (be it a pure JavaScript library, or a higher-level abstraction such as an Ajax-capable JSF
component library), a custom <code>AjaxHandler</code> can be injected into the <code>FlowHandlerAdapter</code> or <code>FlowController</code>.
</para>
</sect2>
<sect2 id="spring-js-ajax-mvc">
<title>Handling Ajax Requests with Spring MVC Controllers</title>
<para>