GroupBy example has row count problems [message #1064929] |
Fri, 21 June 2013 13:11  |
Eclipse User |
|
|
|
I've been integrating the GroupBy functionality into our application and only just now noticed a row counting problem.
If you try the "Column and row grouping/Group by" example, you will note that it has 200 rows when there is no grouping. Now, group on any row. It still has 200 rows, with no added rows for the new tree node rows.
I'll be looking into this further and filing a bug report when I can characterize the problem a bit better. But, meanwhile, is this generally known? Has there been any discussion about it. I couldn't find any.
Thanks.
|
|
|
|
|
|
|
|
Re: GroupBy example has row count problems [message #1065108 is a reply to message #1064966] |
Mon, 24 June 2013 07:44   |
Eclipse User |
|
|
|
Hi Patrick,
so I investigated in this issue, and you are on the right spot as it seems. Even if the GlazedListsEventLayer is added to the layer stack, there is no correct update of the list elements.
The issue is that
- on performing the update of the tree dependent on the grouping, only UPDATE events are fired by the TreeList
- the GlazedListsEventLayer only handles DELETE and INSERT events as structural changes, for UPDATE there is only a VisualRefreshEvent fired
- the GroupByColumnCommandHandler and the UngroupByColumnCommandHandler are registered against the GroupByHeaderLayer, which means the underlying layers are not informed about changes. Also the commands are also just firing VisualRefreshEvents. They should be RowStructuralChangeEvents.
The solution to simply fire the RowStructuralChangeEvent in the update() method as you suggested would be one valid way to go. Another way would be to move the special command handlers to the GroupByDataLayer and let them fire RowStructuralChangeEvents.
After my investigation I would go with your solution, as the events are usually designed to be fired by the layers rather than the commands. But before I'm modifying things I would like to hear Edwins opinion on this. So could you please open a new ticket and link to this topic? Then I will add my investigation results and my opinion into the ticket, so Edwin is possible to get involved.
Thanks for your testing and investigation efforts on this!
Greez,
Dirk
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06388 seconds