Skip to main content



      Home
Home » Eclipse Projects » JFace » [databinding] virtual table, sorting & data binding problems
[databinding] virtual table, sorting & data binding problems [message #795170] Fri, 10 February 2012 01:37 Go to next message
Eclipse UserFriend
Hi,

I'm faced following problem using jface data binding for table viewer (SWT.VIRTUAL) with sorting: when some of model fields updated (from outside or by inline table editor), table viewer should resort of course, so I added listener to ObservableMapCellLabelProvider, it calls TableViewer.update with appropriate args.

So the problem is that changed item duplicated in table, hiding one of the others table rows. Here is example:
before change:
http://d.pr/nVnp+
after change:
http://d.pr/oQ3k+

After resorting table another time by hand (using table column click) everything is ok. I've found this problem using EMF data binding initially, but I created simple test project with bean databinding, and here is the same problem.

Test project here (with all needed jars): http://d.pr/r4sR

Source code: https://gist.github.com/1787145
Re: [databinding] virtual table, sorting & data binding problems [message #795187 is a reply to message #795170] Fri, 10 February 2012 02:03 Go to previous messageGo to next message
Eclipse UserFriend
I guess it is jface bug - please file a bugzilla.

Tom

Am 10.02.12 07:37, schrieb Nikolay Kasyanov:
> Hi,
>
> I'm faced following problem using jface data binding for table viewer
> (SWT.VIRTUAL) with sorting: when some of model fields updated (from
> outside or by inline table editor), table viewer should resort of
> course, so I added listener to ObservableMapCellLabelProvider, it calls
> TableViewer.update with appropriate args.
>
> So the problem is that changed item duplicated in table, hiding one of
> the others table rows. Here is example:
> before change:
>
> after change:
>
>
> After resorting table another time by hand (using table column click)
> everything is ok. I've found this problem using EMF data binding
> initially, but I created simple test project with bean databinding, and
> here is the same problem.
>
> Test project here (with all needed jars): http://d.pr/r4sR
>
> Source code: https://gist.github.com/1787145
Re: [databinding] virtual table, sorting & data binding problems [message #795193 is a reply to message #795187] Fri, 10 February 2012 02:12 Go to previous message
Eclipse UserFriend
Hi, Tom, thanks for quick reply.

I found interesting solution: instead of adding listener to label provider i've overridden TableViewer's handleLabelProviderChanged to call update with appropriate properties array, and everything is ok.

So I think default handleLabelProviderChange messed table up in some way (I think so because ViewerColumn's label provider listener called to it right after my custom label provider listener called update).

Going to file bug.

[Updated on: Fri, 10 February 2012 02:15] by Moderator

Previous Topic:Master Detail Block-Retain Section state
Next Topic:TreeViewer white-out under non-Aero theme in Win7
Goto Forum:
  


Current Time: Wed Jul 23 17:34:59 EDT 2025

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

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

Back to the top