JSF 2.0 and Primefaces with Facelets

前端 未结 1 892
半阙折子戏
半阙折子戏 2021-01-07 14:47

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

1条回答
  •  走了就别回头了
    2021-01-07 15:31

    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 :

    
    

    0 讨论(0)
提交回复
热议问题