Friday, 29 June 2007

Ted at TheServerSide JavaSymposium


It was a great show, in particular, I got to meet Ted.

Posted by ted.goddard at 12:08 PM in Entries by Ted Goddard

Monday, 11 June 2007

ICEfaces on GlassFish v2


A good way to try out ICEfaces with JSF 1.2 is to use GlassFish.

You will need a recent copy of ICEfaces (at the moment, a subversion checkout, but shortly ICEfaces 1.6) and fewer libraries in your .war file. In particular, do not include the following .jar files, as the latest classes are provided by the Java EE libraries included with GlassFish:

    el-ri.jar
    el-api.jar
    jsf-api.jar
    jsf-impl.jar
    myfaces-api.jar
    myfaces-impl.jar

You should have success with both JSP and Facelets based ICEfaces applications.

The next step for ICEfaces (in terms of GlassFish integration) is to make use of the asynchronous features of Grizzly as we've had for some time with Jetty continuations and have recently introduced in prototype form for Tomcat 6.

Posted by ted.goddard at 12:08 PM in Entries by Ted Goddard

Ajax in Safari on Windows


Perhaps the most interesting announcement at Apple's WWDC today is Ajax-related -- the development methodology for third party applications for the iPhone will be Ajax.

Also surprising is the release of Safari for Windows. Here's the ICEfaces Auction Monitor running in Safari, on Windows. Running applications on windows is fine, but we're really looking to try ICEfaces on the iPhone ...

Posted by ted.goddard at 12:08 PM in Entries by Ted Goddard

Thursday, 7 June 2007

Ajax in Spring Web Flow with ICEfaces


I've been working with Keith Donald at Interface21 to integrate Spring Web Flow with ICEfaces. The approach taken (in the current implementation) is actually very similar to the technique provided by Dan Leahu, however, by making the ICEFaces form renderer automatically include the Spring Web Flow _flowExecutionKey, no page changes are necessarily required to add ICEfaces.

To try it out, you will need ICEfaces from subversion (or, shortly, ICEfaces 1.6) and Spring Web Flow 1.0.3. Then, you can proceed to transparently add Ajax features to spring-webflow-1.0.3/projects/spring-webflow-samples/sellitem-jsf.

Add the ICEfaces .jar files to lib/global:

    icefaces-comps.jar
    icefaces.jar
    backport-util-concurrent.jar
    commons-fileupload.jar
    el-api.jar
Configure the web.xml for ICEfaces:
        
                com.icesoft.faces.standardRequestScope
                true
        
including the ICEfaces listener:
    
        com.icesoft.faces.util.event.servlet.ContextEventRepeater
    
And the servlets:
    
        Persistent Faces Servlet
        com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet
         1 
    

    
        Blocking Servlet
        com.icesoft.faces.webapp.xmlhttp.BlockingServlet
         1 
    

    
        Persistent Faces Servlet
        *.iface
    

    
        Persistent Faces Servlet
        /xmlhttp/*
    

    
        Blocking Servlet
        /block/*
    

    

    
        Persistent Faces Servlet
        *.jsp
    

(It's certainly not optimal to map *.jsp to the Persistent Faces Servlet; perhaps a ViewIDMapper is the answer.)

Then, due to a difference in behavior in MyFaces/Sun RI selectOneMenu (should an itemValue of "" be passed as "" or null to the bean?) it is necessary to test for null in Sale.setCategory():

        public void setCategory(String category) {
               this.category = (null != category) ? category : "";
        }

A tag needs to be inserted (ICEfaces is strict about XML syntax) in each of costOverview.jsp and shippingDetailsForm.jsp, and finally .faces links in intro.jsp and costOverview.jsp need to be replaced with .iface links.

Please tell us about your experiences with Spring Web Flow and ICEfaces, either here or on the forums (sample source code is available on the ICEfaces forum). You will find that the new scopes (flash, flow, and conversation) and navigation capabilities of Spring Web Flow are a very natural complement to the Ajax capabilities of ICEfaces.

Posted by ted.goddard at 12:07 PM in Entries by Ted Goddard

« June »
SMTWTFS
     12
3456789
10111213141516
17181920212223
24252627282930