Bug 306377 - [Table] Selection occasionally doubled when scrolling fast
Summary: [Table] Selection occasionally doubled when scrolling fast
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 1.5 M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: consistency
Depends on: 332524
Blocks:
  Show dependency tree
 
Reported: 2010-03-18 10:55 EDT by Ralf Sternberg CLA
Modified: 2011-11-18 13:20 EST (History)
2 users (show)

See Also:


Attachments
Screenshot to show the problem (78.67 KB, image/png)
2010-03-18 10:56 EDT, Ralf Sternberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2010-03-18 10:55:54 EDT
This problem occurs with a large VIRTUAL MULTI Table when using key navigation to scroll down. The key presses change the selection but sometimes the old selection is not cleared. See attached screenshot.
Comment 1 Ralf Sternberg CLA 2010-03-18 10:56:53 EDT
Created attachment 162415 [details]
Screenshot to show the problem
Comment 2 Ivan Furnadjiev CLA 2010-07-12 10:18:01 EDT
After some testing I could reproduce this "double" selection ONLY under FF (tested version 3.6.6 under Windows). Other browsers not affected (tested, couldn't reproduce): IE8, Sfari 5.0.7533.16, Chrome 6.0.458.1, Opera 10.60.
Comment 3 Ivan Furnadjiev CLA 2011-01-20 06:57:37 EST
The bug is still valid with 1.4M4+ and FF 3.6.13.
Comment 4 Tim Buschtoens CLA 2011-06-09 10:32:50 EDT
I cant reproduce it with the new Table, but neither with the old one. Can anyone confirm the problem is gone in HEAD?
Comment 5 Ivan Furnadjiev CLA 2011-06-09 10:39:41 EDT
The problem is still there - tested with HEAD (with merged Tree/Table) and Firefox 4.
Comment 6 Ivan Furnadjiev CLA 2011-08-09 09:00:42 EDT
With the current CVS HEAD is even worse - the old selection is not removed and new item is selected. As a result we have two items selected. Now it's reproducible in all browsers, tested with IE, Chrome, FF and Safari..
Comment 7 Ivan Furnadjiev CLA 2011-11-03 09:21:41 EDT
Actually, it is reproducible with SINGLE VIRTUAL table as well. We looked at it today again and I think that it could be fixed easily with Table protocol migration (move rendering of table selection to TableLCA). As we have plans to migrate the Table to the protocol in next milestone, I hope that this will be fixed in M4.
Comment 8 Tim Buschtoens CLA 2011-11-08 04:26:21 EST
We might want to fix this for 1.4.2. aswell, but there the prototocol doesnt exist. Alternatives?
Comment 9 Ivan Furnadjiev CLA 2011-11-08 06:56:37 EST
(In reply to comment #8)
> We might want to fix this for 1.4.2. aswell, but there the prototocol doesnt
> exist. Alternatives?
The solution will be to investigate why the previous selected item is not deselected from the server-side... or maybe we can do the deselection on the client as well in this case?!
Comment 10 Tim Buschtoens CLA 2011-11-08 08:01:46 EST
I would feel much more comfortable with a server-side solution, as changing the client table would mean also changing the client tree.
Comment 11 Ivan Furnadjiev CLA 2011-11-08 08:14:05 EST
Tim, we are talking about a fix for 1.4.2. There (v14_Maintenance branch), the Tree and Table are not merged on the client :-). Fixing Table will not reflect on Tree in any way.
Comment 12 Tim Buschtoens CLA 2011-11-08 09:18:56 EST
riiiight.... still think a java-only solution is less risky overall
Comment 13 Ivan Furnadjiev CLA 2011-11-09 05:11:57 EST
After some additional investigation I found the following. The Table selection is read from the client and set on the server-side Table in TableLCA. When TableItemLCA#preserveValues is called, the new selection is already set on the Table from TableLCA. Thus, rendering of deselected item is not performed from the server. One possible solution is to wrap the code in TableLCA#readSelection in ProcessActionRunner like this:
...
ProcessActionRunner.add( new Runnable() {
   public void run() {
      table.deselectAll();
      table.select( newSelection );
    }
} );
...
With this code the deselection is performed from the server, but there is an annoying flickering on the client. The clean solution will be same refactoring which will be performed for the HEAD - handle read and *write* of selection from the same LCA (TableLCA). As this is a big refactoring I don't think that it is suitable for 1.4.2. That's why, I will prefer a client-side solution if possible.
Comment 14 Ralf Sternberg CLA 2011-11-09 05:24:10 EST
(In reply to comment #13)
> ...
> With this code the deselection is performed from the server, but there is an
> annoying flickering on the client.

To introduce an annoying flickering is most likely not an option for the final service release ;-)

> The clean solution will be same refactoring
> which will be performed for the HEAD - handle read and *write* of selection from
> the same LCA (TableLCA). As this is a big refactoring I don't think that it is
> suitable for 1.4.2.

Agree. Since this bug is rather old and didn't seem to affect too many users, I'd tend to fix it only in HEAD.

> That's why, I will prefer a client-side solution if
> possible.

If it's simple and safe, yes, otherwise, let's look forward.
Comment 15 Ivan Furnadjiev CLA 2011-11-18 13:20:49 EST
With migration of Table to the protocol I can't reproduce this issue anymore.