Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Sorting removes applied filters
Sorting removes applied filters [message #1798835] Mon, 26 November 2018 13:49 Go to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
I use the 1.5 Version to display a excel like sheet, with about 1500 lines and 20 rows.
When I apply at least two filters on the sheet and apply a sorting on top of it, I observe a not 100% reproducible behavior.
With the sorting applied, the previously applied filters are removed.

Is this behavior known by others?
Re: Sorting removes applied filters [message #1798838 is a reply to message #1798835] Mon, 26 November 2018 14:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
Are the filters the same? Because that is a known bug that is solved in the 1.6 SNAPSHOT versions for a while.
Re: Sorting removes applied filters [message #1798841 is a reply to message #1798838] Mon, 26 November 2018 14:32 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
Hello Dirk,
Thank you for the quick response. I know about the resolution, regarding the filtering with same values.

This behavior is different
Scenario, would be:
1. Load list
2. apply different filters on different columns
3. apply sorting on 3rd column
4. With the sorting applied, a single or both filters are removed. Regardless if the sorting is applied on string or integer value columns

Additional observation is, that the behavior is not 100% consistent. When the scenario is repeated, in some cases the first sorting removes the filters in some cases, the change of the sorting direction or sorting on a different column removes the sorting.
Re: Sorting removes applied filters [message #1798849 is a reply to message #1798841] Mon, 26 November 2018 15:20 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
Never seen that. Is it reproducible in our examples?
Re: Sorting removes applied filters [message #1798852 is a reply to message #1798849] Mon, 26 November 2018 15:29 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
It is only reproducible with tables having more than 100 lines (rows). With tables containing of less lines (rows), like 20, the behavior is not occuring.
Re: Sorting removes applied filters [message #1798854 is a reply to message #1798852] Mon, 26 November 2018 16:16 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
That doesn't answer my question. We also have integration examples with more than 20 rows
Re: Sorting removes applied filters [message #1798894 is a reply to message #1798854] Tue, 27 November 2018 06:50 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
I have tested with the _808_SortableGroupByWithFilterExample, added a filter for the first two columns so that there are more than 100 rows and then sorted for the third column. And I do not observe the behavior you describe.
Maybe an issue with your list or layer composition.
Re: Sorting removes applied filters [message #1802323 is a reply to message #1798894] Wed, 06 February 2019 13:20 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
Hi Dirk, I am getting back to you for my request. Are you able to give me a link on a whole installable package, where the _808_SortableGroupByWithFilterExample is used.
I would set up a pure setup, to compare my with the default setup.

I assume it might be related to the my list or layer composition. I am experienceing some similiar behavior for my table save and also, when I remove lines, with filters active.
All are resulting in a removal of the applied filters. Interestingly, it does not happen everytime.

To provoke it, it set 2 filters and change the sorting on various columns, quite fast, until after 10-15 changed sortings the filter is removed.

While I am writing the situation, it sounds like it could be related to some caching issue?
Re: Sorting removes applied filters [message #1802326 is a reply to message #1802323] Wed, 06 February 2019 14:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
The example is part of our examples application located here: https://www.eclipse.org/nattable/documentation.php?page=examples_application

The most current SNAPSHOT version can be downloaded from the SNAPSHOT builds page: https://download.eclipse.org/nattable/snapshots/

Or you check out the sources. The class itself is located here for example: https://github.com/eclipse/nebula.widgets.nattable/blob/master/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_808_SortableGroupByWithFilterExample.java

It is hard to tell what kind of issue you see if I am not able to reproduce it.
Re: Sorting removes applied filters [message #1802723 is a reply to message #1802326] Thu, 14 February 2019 16:37 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
I tried to reproduce both my issues in the example given:

1. We implemented a filter list, not a text filter. I just found a single filter in the example.
2. We implemented a delete line function in a context menu:

public void removeRow(TableRow remove) {
workingList.remove(remove);
if (addedList.contains(remove)) {
addedList.remove(remove);
} else if (newList.contains(remove)) {
newList.remove(remove);
} else{
removedList.add(remove);
}
}
Both functions, mulitiple sorting and delete, with 2 filters applied cause a loss of the set filters.

Also our list has normally 88 columns instead of 40 and around 1700 and more.

In general, as noted before, we can only reproduce the issue with many lines. When we tried with 30 lines, the function works properly.

Might it be related to the different filter function regarding your example?
Re: Sorting removes applied filters [message #1802726 is a reply to message #1802723] Thu, 14 February 2019 16:54 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
I don't understand what you mean with filter list
Re: Sorting removes applied filters [message #1802762 is a reply to message #1802726] Fri, 15 February 2019 10:09 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
index.php/fa/34899/0/I attached a screenshot showing the mentioned filter.
Re: Sorting removes applied filters [message #1802765 is a reply to message #1802762] Fri, 15 February 2019 10:40 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
ah okay, the combo box filter stuff ... yes I can reproduce that with the _813_SortableGroupByWithComboBoxFilterExample

looks like some synchronization issue that leads to clearing the filters in case the sorting happens while building updating the filter combo values. Could be located in FilterRowComboBoxDataProvider ... but that needs to be investigated in more depth then.
Re: Sorting removes applied filters [message #1802849 is a reply to message #1802765] Mon, 18 February 2019 08:27 Go to previous messageGo to next message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
OK. Thank you for confirmation of the issue.
Any suggestion on a workaround, if I keep using the combobox filter? Could I save and set the table state before and after each user interaction?
Re: Sorting removes applied filters [message #1802861 is a reply to message #1802849] Mon, 18 February 2019 09:53 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
Nope, I don't see a workaround for a concurrency issue. Because you don't know when a sorting operation is finished.
Re: Sorting removes applied filters [message #1802884 is a reply to message #1802861] Mon, 18 February 2019 13:42 Go to previous message
Andreas Sturm is currently offline Andreas SturmFriend
Messages: 18
Registered: August 2018
Junior Member
In the beginning, I mentioned, that for my delete action, as well as for my save action, when several filters are set, I experience the same behavior, that filters are partly or entirely removed from the tabel.

If it is a sync issue, would a timed / delayed reset table state work for this behavior? Ourselfs already try this approach, but had same issues with it. Even though the fitlers where set correctly, a reloaded tablestate scrolled the table always to the 1rst line, regardless its previous line.
Previous Topic:NPE in SelectionLayer
Next Topic:How to re-configure the column group header
Goto Forum:
  


Current Time: Mon Aug 19 00:04:23 GMT 2019

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

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

Back to the top