0

I try to make a composite component as a Primefaces p:column: /resources/ezcomp/columnBd_1.xhtml:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=   "http://www.w3.org/1999/xhtml"
      xmlns:h= "http://java.sun.com/jsf/html"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:p= "http://primefaces.org/ui">

    <!-- INTERFACE -->
    <cc:interface componentType="org.primefaces.component.Column" preferred="true" shortDescription="Extended Datatable">
        <cc:attribute name="header"/>
        <cc:attribute name="value"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <cc:actionSource name="#{component}">
            <p:column headerText="#{cc.attrs.header}">
                <h:outputText value="#{cc.attrs.value}"/>
            </p:column> 
        </cc:actionSource>

    </cc:implementation>
</html>

When I use it inside p:dataTable:

<ez:columnBd_1 header="#{msg.colPriceCloseBid}" value="#{row.closeBid}"/>

I have a column filled with values but there is no header text. Any advice except using tag file?

Zbyszek
  • 647
  • 2
  • 8
  • 21

1 Answers1

0

Try instead declaring the header facet with an outputText component.

<p:column>
  <f:facet name="header">
    <h:outputText value="#{cc.attrs.header}" />
  </f:facet>
</p:column>
maple_shaft
  • 10,435
  • 6
  • 46
  • 74