4

I am using JSF 2.2 with PrimeFaces 4.0. I have a <p:dataTable> with live scrolling, lazy loading, row-expansion and cell-editing, etc.

<p:dataTable
    id="dtaTable"
    selection="#{cont.selectedArray}"
    resizableColumns="true"
    draggableColumns="true"
    var="dataModel"
    value="#{cont.yieldBondsModel}"
    editable="true"
    editMode="cell"
    selectionMode="multiple"
    rowSelectMode="add"
    scrollable="true"
    scrollHeight="650"
    rowKey="#{modeld.id}+#{model.name}"
    rowIndexVar="rowIndex"
    filterEvent="enter"
    styleClass="screenScrollStyle"
    scrollRows="25"
    liveScroll="true"
    lazy="true"
    rows="50"
    filteredValue="#{cont.filteredModel}"
    widgetVar="dt4"
>
    <p:rowExpansion>
        <h:panelGrid id="display" columns="2" cellpadding="4" style="width:300px;" styleClass="ui-widget-content grid">
            <f:facet name="header" styleClass="dataTableHeader">Other Data</f:facet>
            <h:outputText value="id " />
            <h:outputText value="#{dataModel.id}"/>
            <h:outputText value="Name" />
            <h:outputText  value="#{dataModel.name}" />
        </h:panelGrid>
    </p:rowExpansion>

    <p:column width="15">
        <p:rowToggler />
    </p:column>

    ...
</p:dataTable>

On the first page everything works like a charm. Once I scroll it down, data is getting lazy-loaded perfectly fine, but it has some problems during row-expansion and cell-editing:

  1. In row-expansion, I am getting wrong values. Maybe overlapped values from other row.

  2. Cell-editing is also not working. Once I edit any cell, values are not getting displayed in cell-editor. I have checked in Firebug, there is no value in <h:outputText> as confirmed by the generated HTML <div class="ui-cell-editor-output" style="display: none;"></div>. As you can see, there is no value inside the div.

The backing bean is @SessionScoped.

How is this caused and how can I solve it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
arvin_codeHunk
  • 2,328
  • 8
  • 32
  • 47

1 Answers1

2

This is a known issue on PrimeFaces, and already reported and fixed in Elite version (4.0.7 if I remember well). However community release does not contain this fix yet. There is an RC for PrimeFaces 5.0 which contains this fix. You can download it and test if it's suits for you needs, but be aware that this is only a release candidate, not a final release. AFAIK the ETA for the 5.0 final is the first half of May.

Tushee
  • 251
  • 2
  • 8
  • @Tushee..I did not get it, what is RC for PF5.0, and whether PF5.0 is a paid version, as well as Elite Version 4.07 is a paid version or open source. – arvin_codeHunk Apr 22 '14 at 12:35
  • 4.0.7 is Elite version (You have to pay for it, it is not open source). 5.0 is a community version (it is open source). RC = Release Candidate (it is available for download as a beta version (public testing) but not suggested to use in production version yet. – Tushee Apr 22 '14 at 12:53
  • thanks....so for testing and development, can we use this RC 5.0 version? Right now this is show stopper for me, I did some workaround and found that when i remove "rows" property from datatable then livescroll and other behaviours works like charm except Sorting and filtering. And When I add "rows" then livescroll sucks. – arvin_codeHunk Apr 22 '14 at 12:58
  • Yes, you can use it freely. You can use it for production too, it's just not suggested :) If this answer is suitable for you please accept it as right answer. – Tushee Apr 22 '14 at 13:15
  • Hi tushee, I have recently used RC PF 5.0 , but again its not working either. Sorting and filtering is not working when remove row property form data-table with live scroll. – arvin_codeHunk Apr 23 '14 at 08:35