|Re: GroupBy example has row count problems [message #1065108 is a reply to message #1064966]
||Mon, 24 June 2013 11:44
| Dirk Fauth
Registered: July 2012
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!
Powered by FUDForum
. Page generated in 0.02603 seconds