|
Re: [databinding] virtual table, sorting & data binding problems [message #795187 is a reply to message #795170] |
Fri, 10 February 2012 02:03   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03168 seconds