0

My primefaces datatable looks very similar to the showcase, but it has a problem that in edit modus by either clicking cancel or ok, some cells are not shown. see the following code and this snapshot:

edit mode

after clicking cancel or ok

<h:form id="form1">
<p:dataTable  id="table1" var="table1" value="#{myHandler.datarows}" editable="true"
         rowIndexVar="rowIndex"
        filteredValue="#{myHandler.filteredDatarows}"
         style="margin: auto; width: 100%; border: 1; cellpadding: 3;"
         paginator="true" paginatorAlwaysVisible="true" paginatorPosition="bottom"
         rows="12"
         paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
         currentPageReportTemplate="&#8250;&#8250; {startRecord} - {endRecord} of {totalRecords} Rules">
<p:ajax event="rowEdit" listener="#{myHandler.onEdit}" update=":form1:table1"/>
<p:ajax event="rowEditCancel"  listener="#{myHandler.onCancel}" update=":form1:table1"/>

<p:column headerText="Column1" style="width:10%" sortBy="#{datarow.column1}">
    <p:cellEditor>
        <f:facet name="output">
            <h:outputText value="#{datarow.column1}"/>
        </f:facet>
        <f:facet name="input">
            <p:inputText id="column1InputText" value="#{datarow.column1}" style="width:100%"/>
        </f:facet>
    </p:cellEditor>
</p:column>

.....

<p:column style="width:6%">
    <p:rowEditor/>
</p:column>
</p:dataTable>  

Refreshing the page with F5 redraws the table correctly.

Any idea what I am doing wrong?

I am using PrimeFaces 5.1

Tiny
  • 27,221
  • 105
  • 339
  • 599
adranale
  • 2,835
  • 1
  • 21
  • 39

0 Answers0