Page 1 of 2

seam eclipse and Prime Faces

Posted: 03 Jun 2009, 12:31
by aha_01
Hi,
I am new in this forum and I have a question about integrating (implementing) Prime faces in a seam Project?
my devellepement environment are:
eclipse
seam framework
jboss as

I am thankful for every help ;)
aha

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 12:42
by cagatay.civici
Welcome to PrimeFaces forums, if you already have a working seam application, integrating PrimeFaces is very easy.

QuickStart: http://primefaces.prime.com.tr/en/gettingStarted.html

Also PrimeFaces Reference Documentation is the ultimate resource: http://primefaces.prime.com.tr/en/documentation.html

P.S. We're planning to add a seam-primefaces example to our examples suite.

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 13:50
by aha_01
thanks for your replay,
I downloaded the three files:
primefaces-ui-0.8.3.jar
optimus-0.7.2.jar
facestrace-1.1.0.jar
and I modified my templates.xhtml as follows:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a="http://richfaces.org/a4j"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:p="http://primefaces.prime.com.tr/ui">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>seamHome</title>
    <p:resources />
    <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
</head>
<body>
   ...
</body>
</html>
and I added into my web.xml the following rows:

Code: Select all

<!-- Added from me for prime faces -->
	<servlet>
		<servlet-name>Resource Servlet</servlet-name>
		<servlet-class>org.primefaces.ui.resource.ResourceServlet</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>	
	<servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.xhtml</url-pattern>
   </servlet-mapping>	
	<servlet-mapping>
		<servlet-name>Resource Servlet</servlet-name>
		<url-pattern>/primefaces_resources/*</url-pattern>
	</servlet-mapping> 
	
	<!-- End added from me for prime faces -->
My question is now:
Should I add the downloaded jar-files to my project? Waht should I do too?

Thanks for your help in advance ;)
Aha

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 13:55
by cagatay.civici
Yes you only need primefaces-ui-0.8.3.jar if you're willing to use UI components only. You dont need optimus or facestrace since these modules do not depend on each other. Just add primefaces-ui-0.8.3.jar, it'd work.

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 14:05
by aha_01
Hi,
I added the jar file and after starting the AS and testing I found this error:
Error loading org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@817d6 org.primefaces.ui.resource.ResourceServlet
How can I resolve this?


Regards
Aha

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 14:17
by cagatay.civici
Please provide more lines from the stacktrace.

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 15:35
by aha_01
oh sorry, here is the whole error: :)
14:46:17,126 ERROR [[/seamHome]] Error loading org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@fde0d5 org.primefaces.ui.resource.ResourceServlet
java.lang.ClassNotFoundException: org.primefaces.ui.resource.ResourceServlet
Regards
Aha

Re: seam eclipse and Prime Faces

Posted: 03 Jun 2009, 15:37
by cagatay.civici
Ok edited your message to avoid unnecessary parts of the trace.

Seems you haven't properly added primefaces ui to classpath. PrimeFaces is tested with JBoss, no problems.

Could you please make sure, you have the primefaces-ui-0.8.3.jar in your classpath.

Re: seam eclipse and Prime Faces

Posted: 11 Mar 2010, 08:22
by devika
hi ,

i am trying to add primefaces to seam framework.

i have 3 jar files added to classpath, and i have modified the web.xml file also as i have seen in the forum but now i am getting

11:48:45,854 ERROR [[/PrimeFacesAndRichFaces]] Error configuring application listener of class org.primefaces.optimus.listener.ContextListener
java.lang.NoClassDefFoundError: com/google/inject/Module


Any help wat i suppose to do.

Thanks in advance

Regards
Devika.N

Re: seam eclipse and Prime Faces

Posted: 11 Mar 2010, 11:44
by cagatay.civici
Please create a new post instead of continuing old posts as described in forum posting guidelines number #6.

http://primefaces.prime.com.tr/forum/vi ... f=3&t=1194

Thank you.