Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Editable GroupBy Bug, reproduced in the Examples Application
Editable GroupBy Bug, reproduced in the Examples Application [message #1787528] Mon, 28 May 2018 08:34 Go to next message
Alexander Farel is currently offline Alexander FarelFriend
Messages: 4
Registered: March 2018
Junior Member
Hello,

I found a unexpected behavior (visual) that can be reproduced in the Examples Application -> _812_EditableGroupBySummarySummaryRowExampl.

Basically if you a have a group active and you modify the entries of one group, such as that the group doesn't need to exist anymore, all the entries in your table disappear.

index.php/fa/32932/0/
index.php/fa/32933/0/


You need to sort or apply a filter to make them appear again.. This can be reproduced even if the groups are not expanded.

index.php/fa/32934/0/

I initially had this behavior when using a ObservableElementList and my data changes externally. My listener informs the ObservableElementList that the element changed using the "elementChanged" method.

I was thinking about registering a listener on the glazzed list event layer and force the groupByData layer to rebuild the structure (by removing all elements and adding them again) but this does not seem to fix the issue.

Any help is very much appreciated if you can spare the time to investigate.
Thank you!
  • Attachment: 1.PNG
    (Size: 52.77KB, Downloaded 285 times)
  • Attachment: 2.PNG
    (Size: 15.81KB, Downloaded 277 times)
  • Attachment: 3.PNG
    (Size: 45.80KB, Downloaded 319 times)
Re: Editable GroupBy Bug, reproduced in the Examples Application [message #1787539 is a reply to message #1787528] Mon, 28 May 2018 11:54 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
This issue is related to the wrong list reference in the GlazedListsEventLayer creation.

To explain that:


  • The GlazedListsEventLayer is used to fire an event that triggers repainting in case the list has changed
  • The custom UpdateDataCommandHandler changes the SortedList to trigger events that update the tree structure
  • Since the GlazedListsEventLayer is created with the SortedList reference, the set method triggers repainting
  • The TreeList is updating the tree structure as it gets an event from the SortedList
  • As the event for repainting is triggered on changes in the SortedList, but the TreeList is still recreating the tree structure, and the TreeList is used to show the data, the strange side effect occurs. Note that this is not happening always. If you edit back and forth after sorting, the effect is not coming back again.


The fix is to create the GlazedListsEventLayer with the reference to the TreeList. Then another repaint should be triggered once the TreeList is done with the tree structure update. At least this did the trick for me. Would be nice if you could verify this. Then I can update the example for everyone.

GlazedListsEventLayer glazedListsEventLayer =
                    new GlazedListsEventLayer(this.bodyDataLayer, this.bodyDataLayer.getTreeList());

Re: Editable GroupBy Bug, reproduced in the Examples Application [message #1787540 is a reply to message #1787539] Mon, 28 May 2018 12:19 Go to previous message
Alexander Farel is currently offline Alexander FarelFriend
Messages: 4
Registered: March 2018
Junior Member
Thank you for the fast response.

Indeed using the tree list reference for the GlazedListEventLayer seems to do the trick. I can confirm that the fix works in my context too.

I will test some more complex scenarios and will come back to report my findings in case the bug persists.
Thanks again!

Previous Topic:How to detect double click on row header and do something?
Next Topic:Filtering clarifications
Goto Forum:
  


Current Time: Thu Apr 25 06:17:01 GMT 2024

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

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

Back to the top