David R. Heffelfinger

  Ensode Technology, LLC

Bookmark and Share

NetBeans IceFaces Plugin First Impressions

Recently Sun announced that there will be no further development for Project Woodstock. Some maintenance will be done in the project, but no new features are planned.

This announcement affects NetBeans Visual Web projects, since they use Project Woodstock JSF components behind the scenes.

Sun is now recommending that current Woodstock applications be migrated to IceFaces. An IceFaces plugin has been available for a while to develop JSF applications visually using the IceFaces components, the plugin works in a way that is very similar to the standard Visual Web JSF NetBeans plugin.

Since Woodstock will no longer be developed, I figured now is a good time to take the NetBeans IceFaces plugin for a spin, to see how well it works, turns out, it doesn't work very well, at least the current version available from the NetBeans Plugin Manager.

The first issue I ran into is that the Java package for managed beans defaults to the project name and cannot be changed. The project name never adheres to standard Java package naming conventions (i.e. com.mycompany.packagename), therefore we end up with classes in nonstandard packages.

Under Windows, I wasn't able to drag components from the palette into the navigator page, this it is possible using NetBeans standard Visual Web JSF functionality (oddly enough, I was able to do this under Ubuntu Linux). I prefer dropping the components in the navigator page instead of directly in the JSP design view, since dropping the components in the design view results in CSS absolute positioning. I'd rather use the JSF standard way of placing components, which is using a panel grid for layout right inside a JSF form component. This issue can be worked around, by placing a grid in the design view then manually removing its "style" attribute, but it feels cleaner to just drop components in the navigator page.

Also, applications developed using IceFaces cannot be run under GlassFish 3. Maybe there is some faces-config.xml or web.xml incantation that needs to be done in order to make this work, I didn't try and didn't research it, all I did was develop a simple test application and try to deploy it.

Here is a partial stack trace from the GlassFish 3 log when attempting to deploy an IceFaces application developed using the NetBeans Plugin:

SEVERE: Can't find TLD for location [http://java.sun.com/jsf/core]. JAR containing the TLD may not be in the classpath
SEVERE: Can't find TLD for location [http://java.sun.com/jsf/html]. JAR containing the TLD may not be in the classpath
SEVERE: Failed to execute JSP lifecycle.
java.lang.IllegalStateException: ICEfaces parser unable to determine JSF implementation ViewTag class.
        at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:152)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:528)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)

Additionally, when working with standard Visual Web JSF, the "for" attribute of labels and message components can be set by ctrl+shift dragging from the label or message component to the target component. This functionality is not available in the IceFaces visual plugin.

One thing I was looking forward to was finding out if IceFaces wouldn't suffer from my Woodstock pet peeve. In JSF 1.2, the "label" attribute was added to all standard JSF input components. This attribute results in user friendly error messages. The JSF message and messages components by default use the component id to identify a validation error in a component, which is meaningless to the user. The label attribute allows the error message to use a user friendly label, as opposed to the component ID.

Woodstock components have a label attribute that, in addition to enabling user friendly error messages as described in the previous paragraph, actually adds a label to the component. Kind of neat, but it also makes it very difficult to right align all the components and left align all the labels like it is usually done in web applications. Therefore, when using Woodstock, there was always this catch-22 between user friendly error messages and ease of component alignment.

One of the first things I tried when testing the IceFaces NetBeans plugin was to set the "label" attribute on an input text component, and set the component's "required" attribute to "true". I ran the application, submitted the page (purposefully leaving the required input field blank) braced myself and bam! The component id is still shown in the error message, as opposed to my user friendly label, bummer!

I googled a bit and read some people had success with the label attribute using Facelets. I installed the NetBeans Facelets plugin and redid my simple application using Facelets. This time the label attribute "kicked in" and worked as expected.

Although I am not afraid to code things by hand, especially with excellent code/tag completion support like the one found in NetBeans, Visual web provides a nice way to preview a page while working with it, this functionality is lost when using Facelets with NetBeans.

I guess the plugin is "almost there", but the fact that the "label" attribute is ignored is a big bummer. Also, I miss the ability to drop components from the palette into the navigator window, bypassing CSS absolute positioning.

Other functionality we are used to from Visual Web JSF is still there. A request scoped managed bean is created for each IceFaces visual page we create (one caveat, the default package for these managed beans can't be changed, it defaults to the project name, which does not adhere to standard java package naming conventions). Also, double clicking on a command button automatically creates a method on the managed bean to handle its action event.

Although I don't have a lot of experience with this plugin, my impression is that it is better than coding JSF applications by hand, but I really miss some of the missing features from the standard Visual Web JSF functionality.

I would also like to clarify that this entry is not meant to knock IceFaces. I've seen the IceFaces demo apps and I can see that it eases creation of very sophisticated and elegant web applications, I just found some issues with the IceFaces NetBeans plugin that I hope will be addressed in the near future.

Update: a new version of the plugin came out, I tested the new version and wrote my thoughts here.


David, Thank you for the blog and the comments. I appreciate the time you took to try out the plugin and provide feedback. I am very interested in seeing continuing improvement in our NetBeans integration efforts. As you can likely guess, some things are easy to deliver while other features / capabilities might require combined efforts between the ICEfaces and NetBeans teams. I was hoping I might be able to pick your brains early in the new year to get input for our product roadmap and establishing priorities for our upcoming tool integration releases. Just email me directly if you are interested in following up and providing some free advice! Brian McKinney CEO ICEsoft Technologies Inc.

Posted by Brian McKinney on December 19, 2008 at 09:57 AM EST #

I wholeheartedly agree. I took ICEFaces for a spin this morning as I am just starting a new project, and I don't think it's ready for prime time yet. Sticking to Woodstock for the time being...

Posted by Luca on December 19, 2008 at 12:01 PM EST #


I am willing to help you guys out. I need your email address in order to contact you directly.

If you don't want your email address publish, why don't you email me at dheffelfinger at ensode.net?

Posted by David R. Heffelfinger on December 19, 2008 at 05:48 PM EST #

The GlassFish v3 issue has been resolved and a fix will be available in an updated ICEfaces plugin. http://jira.icefaces.org/browse/ICE-3902

Posted by Ted Goddard on December 19, 2008 at 07:02 PM EST #

A new version of the plugin is out. I wrote down my thoughts about it here.

Posted by David R. Heffelfinger on January 10, 2009 at 01:12 PM EST #

Post a Comment:
Comments are closed for this entry.

« February 2019

© David R. Heffelfinger