I\'m trying to incorporate primefaces into my JSF 2.0 web project.
I\'ve recently updated from facelets 1.x to 2.0 and Added primefaces jar to my library folder. Ev
In your template.xhtml
, you need to replace by
and by
. You shouldn't add another ones, that would only result in invalid HTML.
Particularly the
is mandatory as it allows component libraries like PrimeFaces to auto-include the necessary CSS/JS files by resource dependency injection. The
is only mandatory whenever you have
elements with a target="body"
so that they will be auto-relocated to the very bottom of the generated HTML element.
Update your concrete problem is caused by a conflict in the manually loaded jQuery library and the one which is auto-included by PrimeFaces. PrimeFaces uses jQuery and jQuery UI under the covers. If you stick to using PrimeFaces, I'd recommend to drop the manually loaded jQuery and use the PrimeFaces-bundled one instead. To cover pages where you don't use PrimeFaces components as well, you can explicitly load PrimeFaces-bundled jQuery for every page by adding the following line to the
: