From ad320488431e49fc2767fb7dfbe264cfb28ae6ef Mon Sep 17 00:00:00 2001 From: Jeremy Grelle Date: Wed, 5 Aug 2009 23:18:57 +0000 Subject: [PATCH] SWF-1160 - Apache Trinidad ajax requests (PPR) don't work. --- spring-webflow-reference/src/spring-faces.xml | 5 +++++ spring-webflow-reference/src/spring-js.xml | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/spring-webflow-reference/src/spring-faces.xml b/spring-webflow-reference/src/spring-faces.xml index f033f855..1490a394 100644 --- a/spring-webflow-reference/src/spring-faces.xml +++ b/spring-webflow-reference/src/spring-faces.xml @@ -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. + + NOTE - An AjaxHandler 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: SWF-1160 + Typical Trinidad + Spring Faces configuration is as follows in web.xml (in addition to the typical Spring Faces configuration): diff --git a/spring-webflow-reference/src/spring-js.xml b/spring-webflow-reference/src/spring-js.xml index a626ae34..f8a247cc 100644 --- a/spring-webflow-reference/src/spring-js.xml +++ b/spring-webflow-reference/src/spring-js.xml @@ -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. + + Providing a Library-Specific AjaxHandler + + 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 org.springframework.js.AjaxHandler. A SpringJavascriptAjaxHandler 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 AjaxHandler can be injected into the FlowHandlerAdapter or FlowController. + + Handling Ajax Requests with Spring MVC Controllers