Monday, 10 December 2007

Ajax with Spring Web Flow and ICEfaces at TheSpringExperience


TheSpringExperience is on this week, and we're pleased to say that we will be presenting Transparent Ajax with Spring Web Flow and ICEfaces at the conference. One of the main points of the talk is that obtaining Ajax features in Spring Web Flow 2.0 applications is automatic when you include the ICEfaces libraries, but we will also explain how the new scopes introduced by Spring Web Flow are suitable for Ajax applications, and will give a bit of background on how Spring Web Flow and ICEfaces are integrated together. (Spring Web Flow actually exists outside of JavaServer Faces, so this introduced a few interesting challenges.)

To try out Spring Web Flow 2.0 with ICEfaces pre-1.7 now, you will need the latest code from the respective subversion repositories:

  • svn checkout http://anonsvn.icefaces.org/repo/icefaces/trunk/icefaces/
  • svn checkout https://springframework.svn.sourceforge.net/svnroot/springframework/spring-webflow/trunk
Then, in the trunk/spring-webflow-samples directory, add an external link to the pre-configured ICEfaces demo:
  • svn propset svn:externals "icefaces-swf-booking http://anonsvn.icefaces.org/repo/projects/icefaces-swf-booking" .
  • svn update
Build Spring Web Flow with "ant" in the "build-spring-webflow" directory and build ICEfaces with "ant" in the "icefaces" directory. Then, in the "icefaces-swf-booking" directory, copy the following from "icefaces/lib" into "icefaces-swf-booking/lib/global":
  • icefaces.jar
  • icefaces-comps.jar
  • icefaces-facelets.jar
  • jsf-api-1.2.jar
  • jsf-impl-1.2.jar
"ant" completes the build and you can copy the new .war file to your servlet container (Tomcat, for these particular instructions; omit the JSF libraries for GlassFish).

The integration of these two frameworks is preliminary, so there are a few points worth noting. Spring Web Flow resource loading (for CSS and JavaScript files) is not yet integrated with ICEfaces. (The demo makes use of direct URLs into the web application in place of this.) The Spring Web Flow custom components for client-side validation are not yet supported (it seemed best to avoid JavaScript conflicts for the first pass). Also, we didn't have a chance to add any Ajax Push features to the demo; most interesting is whether Ajax Push should be represented as a "flow" within Spring Web Flow.

Please try it out and let us know what you think; we're very excited to have the powerful application abstractions of Spring Web Flow combined with the transparency of ICEfaces. I'll be available at the conference to answer any questions you might have.

Technorati Tags:

Posted by ted.goddard at 5:35 PM in Entries by Ted Goddard

« December »
SMTWTFS
      1
2345678
9101112131415
16171819202122
23242526272829
3031