seam eclipse and Prime Faces

UI Components for JSF
aha_01
Posts: 6
Joined: 03 Jun 2009, 12:23

03 Jun 2009, 12:31

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Jun 2009, 12:42

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.

aha_01
Posts: 6
Joined: 03 Jun 2009, 12:23

03 Jun 2009, 13:50

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Jun 2009, 13:55

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.

aha_01
Posts: 6
Joined: 03 Jun 2009, 12:23

03 Jun 2009, 14:05

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Jun 2009, 14:17

Please provide more lines from the stacktrace.

aha_01
Posts: 6
Joined: 03 Jun 2009, 12:23

03 Jun 2009, 15:35

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Jun 2009, 15:37

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.

devika
Posts: 23
Joined: 11 Mar 2010, 08:15

11 Mar 2010, 08:22

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Mar 2010, 11:44

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.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests