JSF <f:facet> contents not rendered

时光总嘲笑我的痴心妄想 提交于 2019-12-02 05:15:32
starf

You are trying to register a facet on the h:form tag. The example in the link is registered on the h:head tag. Primefaces has a custom renderer for head.

There is no such facet defined for form, so it doesn't know how to handle it. See also <f:facet> not working with <h:form>

I believe you are confusing the css ordering issue. If you wish to override the PrimeFaces css, use the "last" facet in the head - which would place your css definition below the primefaces css.

<h:head>
    <f:facet name="last">
        <h:outputStylesheet library="default" name="css/style.css" />
    </f:facet>
</h:head>

See http://www.mkyong.com/jsf2/primefaces/resource-ordering-in-primefaces/ for a good explanation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!