JSF contents not rendered

后端 未结 1 1389
萌比男神i
萌比男神i 2021-01-24 12:49

I have a page where I need to nest some components inside a , in order to apply custom styles (I\'m using Primefaces and this is their th

相关标签:
1条回答
  • 2021-01-24 13:40

    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.

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