An Introduction To JBoss RichFaces
Tutorial
Installation
We will start by downloading Eclipse.
Eclipse and WTP (Web Tools Project)
- Create a new directory on the drive called richfaces. (Note the lack of spaces in the directory name.)
- We will start by downloading Eclipse 3.3 and WebTools plug-ins. Go to the page http://www.eclipse.org/downloads/packages/release/europa/winter and select Eclipse IDE for Java EE Developers to download. This distribution already includes WTP (Web Tools Project plug-ins). Even if you have Eclipse, it makes sense to have a separate installation just for the example, so it won’t affect any of your other work.)
- Unzip the downloaded file inside the richfaces directory you created.
Make sure you download the right Eclipse version and JBoss Tools version:
| JBoss Tools version | Works with Eclipse version. |
| JBoss Tools 2.1.x | Eclipse 3.3 (Europa) |
JBoss Tools
- Download JBoss Tools by going to the page:http://labs.jboss.com/tools/download/ . Look for the latest 2.1.x GA version.
- Click on the link labeled “All Plugins – Windows/Linux” and download the file.
- Unzip the file inside the richfaces directory
At the end of these steps, you should have the following structure:
richfaces
eclipse
Don’t start Eclipse yet, we have one last step we need to complete: getting the project templates.
Project templates
Project templates will allow you to quickly create a project with RichFaces already configured.
- Download this file: http://java.dzone.com/sites/all/files/richfaces-template.zip
- Unzip the file and copy the content to
- <eclipse>\plugins\org.jboss.tools.common.projecttemplates_X.X.X. You will be warned that you are overwriting some files, which you can safely do.
Tomcat
Download Tomcat 5.5 or 6.0 from http://tomcat.apache.org/ to the richfaces folder and unzip it.
At the end of these steps, you should have the following structure:
richfaces
eclipse
apache-tomcat-X.X.X
We are done with setup. Next, we are going to launch Eclipse and start building our application.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






Comments
Yeray Rodriguez replied on Mon, 2009/07/06 - 7:53am
Hi,
I'm using this code on a seam project and it work properly, but, it doesn't work when the table datatable is sorted. I don't know how to get the row id after user has sorted the table. Now I use the position inside the List of elements I pass to the datatable.
thanks in advance
sarah mark replied on Thu, 2009/08/13 - 4:57am
I must say great website. I have just googled it nice info out there.
Thanks,
Acne
James Bondy replied on Fri, 2009/08/28 - 2:43am
in response to:
Brian ray
It doesn't work to me too, can you upload this files again?
Thanks,
Levitra
Edwin William replied on Mon, 2009/09/07 - 2:16pm
nabil esseme7 replied on Thu, 2009/10/01 - 10:24am
hi maxkatz and thank toy for your wonderful example,
i tried your code and this works fine until i want to add the modal panel and the save and close codes to the user.jsp page
i got this exception when i do that:
the content of my user.jsp is :
any ideas?
thans in advance
Ken Kham replied on Fri, 2009/10/02 - 6:53am
Max Katz replied on Thu, 2009/10/08 - 10:23pm
in response to:
Ken Kham
Max Katz replied on Thu, 2009/10/08 - 10:23pm
in response to:
nabil esseme7
john green green replied on Mon, 2009/10/26 - 3:28am
Dragan Mijailovic replied on Wed, 2009/10/28 - 8:07am
Can I use "keepAlive bean" for the <rich:tree/> component? For example:
<a4j:keepAlive name="someForm"/>
<rich:tree value="#{someForm.data}">
Max Katz replied on Wed, 2009/10/28 - 10:20pm
in response to:
Dragan Mijailovic
Dragan Mijailovic replied on Thu, 2009/10/29 - 8:41am
Thanks a lot. The "keepAlive bean" or bean with page scope should implement the java.io.Serializable interface and because of that I asked about "keepAlive bean" and rich:tree component. I see that org.richfaces.model.TreeNode implements java.io.Serializable interface.
Now, my example with rich:tree is good except I can't know when a node is collapsed. I use this example http://stackoverflow.com/questions/1509962/is-there-an-event-for-collapsing-a-richtree-node
but state.isExpanded(key) is always true!
ely towers replied on Tue, 2009/11/10 - 9:46pm
Im having problems with the save button its saying that it cannot find save method on bean file
here is user.xhtml
Eskendir Mulu replied on Mon, 2009/11/16 - 2:18pm
Is there an out of the box solution to filter tree objects, just like <rich:dtatTable>? if there is none, how would you go about implementing this fuctionality. I'm trying to implement help page.
thanks
Eskendir Mulu replied on Mon, 2009/11/16 - 2:35pm
Chhavi Jain replied on Fri, 2010/01/29 - 5:06am
What are the two themes which we can use in<rich:editor>?
If i use advanced theme then it displays buttons which i have not specified in configuration file,else it doesnt display specified buttons.Please tell me y?
Sami Meddeb replied on Wed, 2010/03/10 - 1:53pm
in response to:
marius batrinu
Shilpa Reddy replied on Mon, 2010/12/06 - 5:51pm
1. When I click edit in the dataTable the Model Panel pops up but it not populated .
2. It throws an on the below line in the modal Panel
h:inputText id="nameInput" value="#{userBean.selectedUser.name}"
Error:
javax.el.PropertyNotFoundException: /user.xhtml @55,81 value="#{userBean.selectedUser.name}": Target Unreachable, 'selectedUser' returned null
.....
Any help is much appreciated.
Thanks!
Sarwo Edi Wibowo replied on Tue, 2010/12/28 - 11:14pm
Peter Sule replied on Wed, 2011/01/05 - 8:26am
Max Katz replied on Thu, 2011/01/27 - 12:39pm
in response to:
Sarwo Edi Wibowo
Max Katz replied on Thu, 2011/01/27 - 12:40pm
in response to:
Peter Sule
ezd ass replied on Thu, 2011/02/17 - 9:40am
David May replied on Mon, 2011/04/11 - 11:33pm
in response to:
ezd ass
David May replied on Mon, 2011/04/11 - 11:49pm
in response to:
Max Katz
Max Katz replied on Mon, 2011/04/18 - 12:21pm
in response to:
David May
Majid Lotfi replied on Thu, 2011/05/12 - 1:38pm
Hi,
I downloaded eclipse but could not find the directory :
org.jboss.tools.common.projecttemplates_X.X.X
under plugins
can you please help.
thanks