"PrimeFaces" is undefined error

UI Components for JSF
Post Reply
sanass
Posts: 15
Joined: 10 Jun 2009, 14:55

17 Dec 2009, 15:03

Hi Cagatay

Previously I was using Primefaces 0.9.3 version which was working fine. Now I have changed that jar with the new Primefaces 2.0.0 version where I can see that the package structure has been changed. I also change my code accordingly.

I have also changed the Resource Servlet tag(class attribute ) in web.xml with the new package structure of ResourceServlet class.
Ex.
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/primefaces_resources/*</url-pattern>
</servlet-mapping>

But when I start my application it's showing "PrimeFaces" is undefined error(javascript error). I think It might be some configuration issue.

I guess it cant recognize any p(primefaces) related tags. but I have included the primeface taglib.
ex. <%@ taglib uri="http://primefaces.prime.com.tr/ui" prefix="p"%>

Please suggest.

Regards,
Sanass

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

18 Dec 2009, 08:45

Hi,

Do you have <p:resources /> in your head tag?

this component is responsible for loading all the js etc.

This might be the issue.

Yigit.

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

18 Dec 2009, 12:28

Hi Sanass,

You also need to change the url mapping as documented in http://code.google.com/p/primefaces/wik ... 093To100RC.

Code: Select all

    <url-pattern>/primefaces_resources/*</url-pattern>
Should be;

Code: Select all

    <url-pattern>/primefaces_resource/*</url-pattern>
I'm pretty sure it'll work ;)

sanass
Posts: 15
Joined: 10 Jun 2009, 14:55

21 Dec 2009, 11:43

Hi cagatay

Yes. It's working. Actually it has been changed from it's previous version.
Thanks a lot.

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

21 Dec 2009, 17:11

Yes, it has changed, sorry for the troubles but library is evolving towards stability :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 88 guests