Export to GitHub

primefaces - issue #1236

Datatable live-scrolling problems


Posted on Sep 18, 2010 by Happy Hippo

The following data table signature causes problems:

<p:dataTable value="#{Employee.listEmployee}" var="e" scrollable=" height="300" selectionMode="single" scrollable="true" rows="20" liveScroll="true">...</p:dataTable>

When you use datatable like this, then only first 20 of rows works as expected (or X rows if you put rows=X). Data is shown ok, but any link, button or other component placed inside one of datatable's columns doesn't work after scrolling over X rows. When I scroll to 30th, or 50th or whatever is larger then this X rows: links, buttons, live editing just stops working.

I'm using JSF Mojarra 2.0.3, Primefaces 2.2 M1, Facelets. Application is run on Glassfish 3.0.1.

Comment #1

Posted on Nov 22, 2010 by Happy Hippo

By the way, this issue has been discussed on forum:

http://primefaces.prime.com.tr/forum/viewtopic.php?f=3&t=4675&start=0

Comment #2

Posted on Dec 16, 2010 by Happy Hippo

Comment deleted

Comment #3

Posted on Dec 16, 2010 by Happy Hippo

Anyone has seen this ticket??? Any news on this?

Comment #4

Posted on Dec 22, 2010 by Helpful Wombat

Any news? When this issue will be fixed?

Comment #5

Posted on Dec 23, 2010 by Happy Panda

I have similar problem

Comment #6

Posted on Dec 23, 2010 by Happy Hippo

Table with live scrolling is quite useless if this bug remains in future. Hope that someone out there will notice this issue!

Comment #7

Posted on Dec 27, 2010 by Grumpy Elephant

I have the same problem! Table is useless!

Comment #8

Posted on Jan 20, 2011 by Happy Hippo

I must add here since I have no reply on original post: data table live scroling isn't working at all! It only works if you have plain data with no links. If you put link in some column or command button it just won't pas any parameters trough f:attribute.

I created this issue 3-4 months ago, but nobody from primefaces replies a long time now! Please notice this! Live scrolling is really great feature but useless currently.

Comment #9

Posted on Jan 21, 2011 by Massive Giraffe

Yes, I agree totally unusable.

Comment #10

Posted on Jan 24, 2011 by Massive Lion

I'm at one with Comment 8 by sal...@gmail.com, Jan 20. It would be a great feature if it works good. Please make it better.

Comment #11

Posted on Jan 24, 2011 by Happy Bear

2.2 is about to be released, and nothing yet on this issue. Any chances we enjoy this feature soon?

Comment #12

Posted on Jan 25, 2011 by Massive Giraffe

This would solve many problems in the papers ....

Comment #13

Posted on Jan 25, 2011 by Helpful Wombat

Live scrolling is great feature, if it works properly, of course. So, is there any chance, that this issue will be fixed in 2.2 final release?

Comment #14

Posted on Jan 25, 2011 by Grumpy Cat

I would agree that with this bug live scrolling is almost useless.

Comment #15

Posted on Mar 23, 2011 by Happy Hippo

I made another post on forum, mailed Cagatay and he said they can give it high priority and make sure it will be in 3.0.M1, even do it is not planned.

http://primefaces.prime.com.tr/forum/viewtopic.php?f=3&t=8234

Comment #16

Posted on May 25, 2011 by Quick Lion

Hi, I maanged to resolve this issue. I modified the org.primefaces.component.datatable.DataTableRenderer a bit. Here is the link in the forum: http://primefaces.prime.com.tr/forum/viewtopic.php?f=3&t=8234&p=38007#p38007

I made a patch too, but I can't seem to attach it.

Comment #17

Posted on May 25, 2011 by Quick Lion

Here is the patch in plain text:

This patch file was generated by NetBeans IDE

Following Index: paths are relative to: D:\Hrx-Employee\trunk\Employee\src\java\org\primefaces\component\datatable

This patch can be applied using context Tools: Patch action on respective folder.

It uses platform neutral UTF-8 encoding and \n newlines.

Above lines and this line are ignored by the patching process.

Index: DataTableRenderer.java --- DataTableRenderer.java Base (BASE) +++ DataTableRenderer.java Locally Modified (Based On LOCAL) @@ -34,6 +34,7 @@ public class DataTableRenderer extends CoreRenderer {

private DataHelper dataHelper;

+ private int myRows = -1;

public DataTableRenderer() {
    dataHelper = new DataHelper();

@@ -901,7 +902,12 @@ String selectionMode = table.getSelectionMode(); Object selection = table.getSelection();

  • for (int i = scrollOffset; i < (scrollOffset + table.getRows()); i++) {
  • if (myRows == -1) {
  • myRows = table.getRows();
  • }
  • table.setRows(scrollOffset + myRows); +
  • for (int i = scrollOffset; i < (scrollOffset + myRows); i++) { encodeRow(context, table, clientId, i, rowIndexVar, selectionMode, selection); } }

Comment #18

Posted on Aug 20, 2011 by Swift Rhino

Taking ownership.

Comment #19

Posted on Aug 20, 2011 by Swift Rhino

Fixed by adding scrollRows option. Use this one instead of rows attribute for livescrolling.

Comment #20

Posted on Aug 20, 2011 by Happy Hippo

Finally!!! Great!

Status: Fixed

Labels:
Priority-Medium Type-Defect TargetVersion-3.0 TargetVersion-3.0.M3