-
1. Re: Richfaces datatable will not call bean or render data
ilya_shaikovsky Apr 2, 2010 10:00 AM (in response to jabailo)checked and has no problem with such definition. anything in the log? RF version?
-
2. Re: Richfaces datatable will not call bean or render data
jabailo Apr 2, 2010 12:44 PM (in response to ilya_shaikovsky)I tried a different approach. I created a base jsp page with the core jsf taglibs.
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
Then, using Eclipse, I dragged and dropped a JBoss RichFaces dataTable from the JBoss Tools Palette.
At that point it added a new taglib:
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
However, that taglib has an error highlight that says:
Cannot find the tag library descriptor for http://richfaces.org/rich
I tried bringing up the url in a browser and it takes me to the JBoss Community RichFaces page.
-
3. Re: Richfaces datatable will not call bean or render data
nbelaevski Apr 2, 2010 1:10 PM (in response to jabailo)Hi John,
Please check that RichFaces .jar files (three files) are present in application classpath together with commons-* dependencies (four .jar files for logging, collections, digester, beanutils).
-
4. Re: Richfaces datatable will not call bean or render data
jabailo Apr 2, 2010 1:20 PM (in response to nbelaevski)The commons dependencies are in my Web App Libraries, but the RichFaces jars are not.
Do I need to explicitly add them to my Java Build Path libraries?
-
5. Re: Richfaces datatable will not call bean or render data
nbelaevski Apr 2, 2010 1:35 PM (in response to jabailo)Yes, try adding them there.
-
6. Re: Richfaces datatable will not call bean or render data
jabailo Apr 2, 2010 2:00 PM (in response to nbelaevski)The three richfaces jars now appear in the Referenced Libraries folder of my project.
However, the datatable still does not render.
I notice one error message in the Console when I run my .jsp page:
13:51:42,291 INFO [STDOUT] 13:51:42,291 ERROR [MyfacesConfig]
Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
Should I delete MyFaces jars?
-
7. Re: Richfaces datatable will not call bean or render data
jabailo Apr 2, 2010 2:42 PM (in response to nbelaevski)I started a jsp page from scratch.
This time, I am offered the chance to add the RichFaces libs to the .jsp so I assume the jars are now recognized.
However, when running the page, this error appears:
org.apache.jasper.JasperException: The absolute uri: http://richfaces.org/rich cannot be resolved in either web.xml or the jar files deployed with this application
This is what the page looks like:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
<rich:dataTable value="#{userBean2.users}" var="user">
<h:column>
<h:outputText id="name" value="#{user.name}"/>
</h:column>
<h:column>
<h:outputText id="email" value="#{user.email}"/>
</h:column>
</rich:dataTable>
</f:view>
</body>
</html> -
8. Re: Richfaces datatable will not call bean or render data
jabailo Apr 2, 2010 5:31 PM (in response to jabailo)Ok, I got it working -- thanks for everyone's help for being such a noo3.
My confusion came from thinking that by using the Eclipse/JBoss preconfigured version that RichFaces would be there for me (also seeing the controls in the Toolbox). That appears not to be the case, and I still have to manually configure.
I followed these instructions to the letter:
http://docs.jboss.org/richfaces/latest_3.3.X/en/devguide/html_single/#GettingStarted
And now my RichFaces dataTable renders from the bean.
-
9. Re: Richfaces datatable will not call bean or render data
jabailo Apr 6, 2010 7:17 PM (in response to jabailo)Well, I have an update and it's not good news.
After further inspection, I wasn't actually running the RichFaces page in my project. It still did not work correctly.
I went back and created a brand new project with JBoss tools.
I found there is an option for JSF project that includes the RI libs (which appear to be part of JBoss 4.3.2).
However, even as a shell project the initial page failed to deploy and it broke deployment of other projects!!
My reading seems to indicate that there is just something broken with RichFaces and JBoss prior to 5.x -- whatever it is, it certainly isn't a trivial configuration.
So, I went back to what has worked for me, Tomahawk MyFaces. I find that they have not only a dataTable but a modalPopup -- the two controls I needed. Seems to work just fine.
-
10. Re: Richfaces datatable will not call bean or render data
nbelaevski Apr 6, 2010 7:22 PM (in response to jabailo)Hi,
That's strange because I was successfully running several RichFaces applications at JBoss 4.3 simultaneously. Can you please provide more information on broken deployments?
-
11. Re: Richfaces datatable will not call bean or render data
jabailo Apr 6, 2010 7:47 PM (in response to nbelaevski)I am more than willing to post those from my server logs, but since yours works, can you tell me:
1. Are you using JBoss tools with Eclipse?
2. What project type are you using?
3. What template options are you using? Did you select Facelets with RI Libs?
4. Are you using xhtml or jsp pages for your RichFaces dataTable? Are you using a managed bean to populate?
5. When you create your jsp page, what taglib options do you select?
6. What addiitonal jar did you add to your project? Did you put them in WEF-INF/lib ? Did you have to remove any JBoss built in jars from your classpath? If so, how did you do this?
7. Did you follow any guide or set of instructions or tutorial for getting your JSF/Facelets/RichFaces dataTable to work with a managed Bean? Do you have a hyperlink?
-
12. Re: Richfaces datatable will not call bean or render data
ilya_shaikovsky Apr 7, 2010 3:29 AM (in response to jabailo)It seems for me that all the problems just in configuration of the projects. http://docs.jboss.org/tools/movies/demos/rich_faces_demo/rich_faces_demo.htm screencast about simple JSF-RF project creation using tools. It uses JSP but after you will sucsessfully check that it works I highly recommnend to switch to facelets.
However, even as a shell project the initial page failed to deploy and it broke deployment of other projects!!
about all such problems - there are should be exceptions at server log on server startup. You should carefully check them and investigate the reasons. If you not find out the problem but solved it by just implementations switching - ti seems like just a hack and some (probably other) configuration problems wil re-appear in future. All our test applications switches between myFaces and JSF RI smoothly and supports deployments to different app servers (sometimes some dependencies or configuration changes required for concrete server). So JSF implementation should not be the reason for sure.
-
13. Re: Richfaces datatable will not call bean or render data
jabailo Apr 7, 2010 2:05 PM (in response to ilya_shaikovsky)Thanks for all the help.
The link you provide is for JBoss Developer Studio.
But I found this article about configuring Eclipse for JBoss Richfaces, JSF...
http://giantflyingsaucer.com/blog/?p=723
All thought they are using Tomcat 6.0, not JBoss 4.2.3
-
14. Re: Richfaces datatable will not call bean or render data
nbelaevski Apr 7, 2010 6:43 PM (in response to jabailo)Well, I mostly work with Maven-based WAR projects that use Facelets and I've started using JBT recently (previously used WTP + the hint from Dan Allen: http://goo.gl/JN9B ), so can't give much help for it, sorry.
Types of beans: either managed beans or Seam components, also Spring beans (rarely).
On the list of necessary libs: I recommend to stick to Maven (that handles dependencies automatically). Anyway, the following is necessary for JBoss 4.3:
- four commons-*
- RF api, impl, ui (EAR layout has some specifics - checks docs if you need it)
For optimal performance:
- Neko HTML + dependencies (Xerces) -
JBoss 4.3 comes with JSF, so you don't have to bundle it.
If you want to use MyFaces, check this article please: http://community.jboss.org/wiki/JBoss5AndMyFaces