Saturday, June 23, 2012

Icefaces 3 on Grails with JSF 2 Plugin

Continuing on the previous posts, I have managed to get the new Icefaces 3 libraries working with the Grails JSF 2 Plugin.

To get it working, just follow all the steps in the previous post for Icefaces 2.0.2. For Icefaces 3, download the libraries and replace the all the Icefaces jars on the lib directory with these files from Icefaces 3:
icefaces.jar
icefaces-ace.jar
icefaces-compat.jar
icepush.jar

However, there is one additional change that needs to be made to the web.xml file. Please add the following lines to the web.xml template file:

<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>

If you don't add these lines, when you click on a button (or do a post back), there a Server Error popup will appear and on the console, the system will raise a Java exception as follows:

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.sun.faces.application.view.StateHolderSaver

Please try it and let me know if all the Icefaces 3 features are working with this Grails JSF2 plugin. By the way, this has been tried on Grails 1.3.7.

No comments:

Post a Comment