RichFaces for NetBeans IDE 6.1 (Part 1)

Yesterday I met with Wouter van Reeven, here in San Francisco, who mentioned the RichFaces framework to me. In particular, people in a JBoss-oriented world are likely to want to use RichFaces (as well as ICEfaces, Seam, and Facelets). For ICEfaces, a NetBeans plugin exists (here), though it works in 6.0 only. I've tried it, it's a pretty cool thing: you get support both for traditional web applications and for Visual Web applications. I'm hoping they'll upgrade to 6.1 soon (shouldn't be hard, I expect they only have a dependency change to fix).

However, no such thing exists for RichFaces. What's the difference between ICEfaces and RichFaces? No idea. Didn't know they existed until yesterday. However, they piqued my interest because of AJAX, which is a theme at NetBeans Day on Monday. So I created some basic NetBeans support for RichFaces, based on a cool and simple example application that Wouter sent me today. Go here to download the new support I created and then read on to learn about what it can do for you:

Download that ZIP file, you will have two NBM files in the ZIP file, install them both in NetBeans IDE 6.1.

Now do the following:

  1. Create a new web application.

  2. Make sure to set GlassFish as your server, because this server bundles JSF libraries and RichFaces is an extension of JSF. If you want to use Tomcat or some other server, make sure JSF is available to the server in question.

  3. In the Frameworks panel, choose Java Server Faces AND RichFaces:

    Click Finish.

  4. Inspect the generated sources. In addition to your standard JSF application, you have the RichFaces JARs in the Libraries node, you have RichFaces entries in your web.xml, your welcomeJSF.jsp contains some RichFaces-specific code, and you have a managed JSF Java bean in a new package in your source structure, automatically registered in faces-config.xml. Here's the whole thing:

  5. Run the application and you have your first AJAX application via RichFaces:

    Notice that the text to the right of the field is automatically updated as you type in the field itself. That's AJAX, partial page refresh, faster response to the user, etc.

  6. Want to change the "skin" of the application? Drop this into the web.xml:


    Run the app again and notice the "skin" is different:

Now continue learning about RichFaces via online resources. Next, I will create a palette that provides items that you can drag and drop into a JSP page, for RichFaces. However, I doubt I will ever create RichFaces support for Visual Web applications, because that's an area I have little knowledge (nor very much interest) in. If someone wants to help me, such as in the area of Visual Web, feel free to leave a message here and let me know!


Never heard of Richfaces :) it's marvellous! We use it almost by default along with Facelets, a rather nice combination. Nearly every JSF projects contains these two and that gets about 90% of what we need done. Great to see some work to add Richfaces, tag completion and a palette would be tremendous, but when do we get Facelets back in 6.1?

Posted by Scoot on May 03, 2008 at 10:15 PM PDT #

Hey Geertjan,

That's excellent! I really need to dive into the NetBeans Platform API soon to be able to create this kind of modules myself. Let's talk during JavaOne to see how this can be extended so the RichFaces tags also are in the Component Palette and can be dragged and dropped onto JSF/Facelets pages.

Greets, Wouter

Posted by Wouter van Reeven on May 03, 2008 at 10:33 PM PDT #

Thanks for the comments. I will try and find out about Facelets, Scoot. Here's an additional plugin for RichFaces, as well as info on tag completion:

Posted by Geertjan on May 04, 2008 at 12:28 AM PDT #

I agree with Scoot. We need Facelets in 6.1, it's what holds our team back in 6.0 mode.

Posted by Casper on May 04, 2008 at 06:15 AM PDT #

I touch richface only one week ago,there is nothing I can do before I view your topic in the website.The topic tell me how to use richfaces by NetBeans IDE 6.1.Thanks for your guide of richfaces.

Posted by Alex.deng on July 02, 2008 at 04:06 PM PDT #

It is great! I am expecting Visual Web JSF.

Posted by Will on September 22, 2008 at 06:59 AM PDT #


Posted by dsaf on November 24, 2008 at 09:31 AM PST #


Posted by guest on December 02, 2008 at 04:06 PM PST #

so astonished! thanks a lot

Posted by guest on December 02, 2008 at 04:06 PM PST #

Is there something new for Netbeans 6.5

Posted by adamo901 on December 03, 2008 at 08:28 AM PST #

Thanks friend!
I need this very much!

Posted by Fábio Henrique - Rio de Janeiro - Brasil on February 11, 2009 at 09:06 AM PST #

This is really great to use richfaces with netbeans.
Wheather it supports for JavaEE 5.0 using JBoss4.3 or 5.0 with Netbeans6.5.
Currently it is not showing JavaEE5.0 option using JBoss.
Dinesh Chothe

Posted by Dinesh Chothe on February 12, 2009 at 02:03 PM PST #

support netbeans6.8??

Posted by vieri122 on January 17, 2010 at 05:11 PM PST #

Where are the plugin sources?

Posted by Jocenildo Paraizo on March 02, 2010 at 09:11 AM PST #

hello, i'm trying to run the example with jsf 2.0 but when I do, it doesn't load the page but tries to download the index.xhtml page. Do you know why? tks!!

Posted by damian on July 13, 2010 at 11:47 AM PDT #

I m getting error of xml when i use richfaces with bean at time of deploy

Posted by guest on June 08, 2011 at 04:40 PM PDT #

To install the plugin in netbeans ,refer

Posted by guest on January 25, 2012 at 07:13 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016