0

The datatable show this column (and others):

<p:column id="columnId" headerText="#{bundle.headerColumn}"
                              rendered="#{item.condition()}" >
    <p:cellEditor id="cellEditId">  
        <f:facet name="output"  >
              ...
        </f:facet>
        <f:facet name="input">
              ...
        </f:facet>
    </p:cellEditor>
</p:column>

ajax update the data table:

<p:ajax event="cellEdit" listener="#{controller.onCellEdit}" 
                        update="dataTableId" />

but the column header of this column is not showed after ajax updates. The column rows and footer are showed ok and the headers of columns at right are shifted one column to left.

Before ajax, the html rendered is:

<span><span>Header Text</span></span></th>

But the code after ajax update is:

<span>Header Text</span></th>

Other columns are ok but they don't have rendered attribute.

user2574822
  • 1
  • 1
  • 1

1 Answers1

4

Put this in your datatable:

<p:columnGroup type="header">  
                                <p:row>
                                    <p:column headerText="Select" />  
                                    <p:column headerText="Name activity" />  
                                    <p:column headerText="View activity" />  
                                    <p:column headerText="Consistency and completeness" />  
                                </p:row>
                            </p:columnGroup>

This is a header's of your table...after put your columns.

Here there a example: http://www.primefaces.org/showcase/ui/datatableGrouping.jsf

By.