Table live scrolling

UI Components for JSF
Post Reply
salex
Posts: 37
Joined: 08 Sep 2010, 14:29
Location: Munich

03 Mar 2011, 12:24

Hi,

I'm facing an issue with table component in Primefaces 2.2.1. This problem was in previous versions as well.

If I have any links, buttons in columns, those simply don't work when I scroll down. Only in first X rows, actions/actionListeners are triggered. When I scroll down and fetch more rows in the table, links/buttons are totally useless!

Is there any workaround to make this feature work??? It works relay nice when it scrolls but useless do! Ever since live scroll was introduced, this feature has a bug.

Important properties I have set in p:dataTable tag: scrollable = "true", liveScroll = "true, rows = "10"

With properties set as above, only first 10 rows, that are actually shown, works fine (buttons and links in them).

Help!!!???

Glassfish 3.0.1, Mojarra 2.0.4, Primefaces 2.2.1, Web browser: Firefox/IE

vanjadardic
Posts: 55
Joined: 08 Sep 2010, 09:18
Location: Banja Luka, Bosnia and Herzegovina
Contact:

03 Mar 2011, 14:28

This is a really important feature IMO. With large datasets rendering is significantly slower, especially in IE browsers. Lazy scrolling is a really great feature, but those "pesky" commandLinks/commandButtons make it unusable. :(

I guess a workaround using javascript, hidden input fields and p:remoteCommand is possible, but it would be a really ugly hack, and it would have to be added to every dataTable.

Can anyone from PrimeFaces team shed some light on this one?
PrimeFaces version: whatever is the latest
Mojarra version: whatever is the latest
GlassFish & Tomcat version: whatever is the latest
Chrome & Firefox version: whatever is the latest
And a little bit of IE

salex
Posts: 37
Joined: 08 Sep 2010, 14:29
Location: Munich

10 Mar 2011, 15:24

Still no answer on this???

Anyone out there see that livescroll option is useless for a long time now, and has never been fixed??? Cagatay please help with this. Should I report an issue ticket maybe???

popeye
Posts: 8
Joined: 16 Nov 2010, 20:40

10 Mar 2011, 19:59

Does anyone knows when this problem will be finally fixed?
This is really great feature, but now it's completely useless.

salex
Posts: 37
Joined: 08 Sep 2010, 14:29
Location: Munich

17 Mar 2011, 20:30

Oh come on! I am getting tired and frustrated. I just cant believe anymore that nobody from primefaces is responding on this post! Seems like this issue is being ignored and I don't know why.

I was waiting so long for live scroling in data table. It's here for maybe a 6 months now or so, but completely useless.

Will anyone answer this ever?????

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

18 Mar 2011, 16:15

I don't work for PrimeFaces and I don't use live scrolling, but I'll respond to your post to make you happy!

Oh by the way, it looks like there is an issue ticket already created so you can vote for this if you haven't already:

http://code.google.com/p/primefaces/iss ... il?id=1236

salex
Posts: 37
Joined: 08 Sep 2010, 14:29
Location: Munich

18 Mar 2011, 17:54

Well, guess who made that issue? :) :)

Anyway, thank you for your support, but live scroll still sucks! :cry:

vanjadardic
Posts: 55
Joined: 08 Sep 2010, 09:18
Location: Banja Luka, Bosnia and Herzegovina
Contact:

25 May 2011, 10:50

Hi, I have some good news about this one. I encountered a similar problem while I was writing my own datatable component and was able to fix it, and I was able to fix the primefaces datatable too. :)

The change is in the org.primefaces.component.datatable.DataTableRenderer. Just add new private variable like this:

Code: Select all

private int myRows = -1;
and then modify encodeLiveRows method to look like this:

Code: Select all

private void encodeLiveRows(FacesContext context, DataTable table) throws IOException {
  Map<String, String> params = context.getExternalContext().getRequestParameterMap();
  int scrollOffset = Integer.parseInt(params.get(table.getClientId(context) + "_scrollOffset"));
  String clientId = table.getClientId(context);
  String rowIndexVar = table.getRowIndexVar();
  String selectionMode = table.getSelectionMode();
  Object selection = table.getSelection();

  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);
  }
}
I will also post something similar in the related issue:
http://code.google.com/p/primefaces/iss ... il?id=1236
PrimeFaces version: whatever is the latest
Mojarra version: whatever is the latest
GlassFish & Tomcat version: whatever is the latest
Chrome & Firefox version: whatever is the latest
And a little bit of IE

salex
Posts: 37
Joined: 08 Sep 2010, 14:29
Location: Munich

25 May 2011, 11:05

Thank u so much!

I was waiting this so long, and didn't have any luck with primefaces team. This issue seams to be ignored and I don't know why! Table live scrolling, which is extremely important, isn't working at all because of this bug. I hope they will include this fix in next release.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 27 guests