Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Virtual TableViewer sorting causes selection problems
Virtual TableViewer sorting causes selection problems [message #1011367] Tue, 19 February 2013 12:22 Go to next message
Uzma Pathan is currently offline Uzma PathanFriend
Messages: 3
Registered: February 2013
Junior Member
Our application is an RCP appliction and needs to display table of several thousands items. For this reason, we're using SWT.VIRTUAL in our TableViewer. That works pretty well except for selection.

We're having following issue :

- Our TableViewer support sorting and filtering. When we use a virtual tableviewer, changing the selection does not preserve the current selected item but the row currently selected.This leads to another item being selected.
e.g: If Item 'A' present at the 5th row is selected by user and sorting is performed, then after sorting the Item at the 5th row gets selected instead of the Item 'A'.
Using a non virtual TableViewer, everything works fine.

We tried to go into debug and found out that the cache from the AbstractTableViewer.VirtualManager class seems to be up to date with the model. Forcing the cache to be used in the AbstractTableViewer.virtualSetSelectionToWidget() can be a possible approach.

We have tried to implement a solution suggested in https://bugs.eclipse.org/bugs/show_bug.cgi?id=338696. However it didn't work.

Please suggest some pointers or alternative work around.

Thanks for the answers.
Uzma Pathan
Re: Virtual TableViewer sorting causes selection problems [message #1015715 is a reply to message #1011367] Fri, 01 March 2013 21:24 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
You may get more response if you ask this on the jface newsgroup/forum,
since TableViewer is in JFace, not swt.

Grant


On 2/19/2013 3:46 PM, Uzma Pathan wrote:
> Our application is an RCP appliction and needs to display table of
> several thousands items. For this reason, we're using SWT.VIRTUAL in our
> TableViewer. That works pretty well except for selection.
>
> We're having following issue :
>
> - Our TableViewer support sorting and filtering. When we use a virtual
> tableviewer, changing the selection does not preserve the current
> selected item but the row currently selected.This leads to another item
> being selected. e.g: If Item 'A' present at the 5th row is selected by
> user and sorting is performed, then after sorting the Item at the 5th
> row gets selected instead of the Item 'A'.
> Using a non virtual TableViewer, everything works fine.
>
> We tried to go into debug and found out that the cache from the
> AbstractTableViewer.VirtualManager class seems to be up to date with the
> model. Forcing the cache to be used in the
> AbstractTableViewer.virtualSetSelectionToWidget() can be a possible
> approach.
>
> We have tried to implement a solution suggested in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=338696. However it didn't
> work.
>
> Please suggest some pointers or alternative work around.
>
> Thanks for the answers.
> Uzma Pathan
Previous Topic:Eclipse Juno Reporting
Next Topic:Focus Issue
Goto Forum:
  


Current Time: Thu Apr 25 22:41:00 GMT 2024

Powered by FUDForum. Page generated in 0.02511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top