PrimeFaces components are not rendered in browser in spite of dependency being present

前端 未结 4 2113
北海茫月
北海茫月 2021-01-14 16:45

I\'m developing a JSF web application with PrimeFaces 3.5 on Eclipse 4.3. There are no compiletime or runtime errors and the application deploys successfully. However, I can

4条回答
  •  粉色の甜心
    2021-01-14 17:22

    As to the cause of your concrete problem of PrimeFaces components not being rendered, as per the screenshot, you have a leading blank space in PrimeFaces taglib URI:

    xmlns:p=" http://primefaces.org/ui"
    

    This is significant and thus wrong. Get rid of it:

    xmlns:p="http://primefaces.org/ui"
    

    This way the PrimeFaces components must be parsed and appear in the HTML output.

    For the remainder I strongly recommend you to go through a sane JSF2 tutorial first. You're making several conceptual mistakes which are already covered by a decent Hello World example. Start at our JSF wiki page. Those mistakes do however not have this "blank page" as consequence. They will cause different problems (e.g. CSS/JS not functioning and form submit not working). If you still stucks on that, you should essentially be asking a new question.

提交回复
热议问题