Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jsf

primefaces

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>
like image 402
Karim Oukara Avatar asked Oct 31 '12 13:10

Karim Oukara


1 Answers

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>
like image 132
BalusC Avatar answered Nov 15 '22 07:11

BalusC