How to add image in headerText attribute of

?

2020-07-10 11:34发布

enter image description here

How to add image in headerText attribute of <p:column>?

<p:dataTable id="tableId" var="list" value="#{beanRequest.list}" >
    <p:column headerText="Date">
        <h:outputText value="#{list.date}"  />
    </p:column>
    p:column headerText="A">
        <h:outputText value="#{list.a}" />
    </p:column>
    <p:column headerText="????????image here?????????">
        <h:outputText value="#{list.b}"/>
    </p:column>
</p:dataTable>

1条回答
beautiful°
2楼-- · 2020-07-10 11:54

Use <f:facet name="header"> instead to specify non-simple-text content.

<p:column>
    <f:facet name="header">
        <h:graphicImage name="weather.png" />
    </f:facet>
    ...
</p:column>
查看更多
登录 后发表回答