Generic Filter with PivotTable doesn't repaint PivotTable


i have looked into the PivotTable component and think that this is really a big feature that can be a game changer once again…
As i understand it, it groups and filters the data inline if i understand it correctly. So instead of changing the database query for filtering (and grouping) it fetches the whole table and does the filtering in memory of tomcat (is that right?).

So i tried to use the generic filter component in conjunction with the pivotTable. Unfortunately it doesn’t work out of the box. The filter needs a “applyTo” attribute which i set to the pivotTable. But it doesn’t seem to update the pivotTable.

The additional step that i took is to add a CollectionChangeListener and repaint the pivotTable like this:

collectionDs.addCollectionChangeListener(e -> pivotTable.repaint());

So this whole use case is for a non-editable pivotTable. So my question is here: can you support the repaint of the pivotTable through the usage of the “applyTo” attribute of the filter component?

In the editable PivotTable case, there are filter mechanisms baked into the pivotTable. Are these filters SQL filters or will they just not display the data on the UI but do the fetching of the whole dataset?



In fact PivotTable performs filtering and grouping on a client side - right in a web browser with data that is already loaded to memory of an application server.

Please note that applyTo is only required for Folders functionality and Filter can work without it.

I think that this behaviour is an error and we will fix it so non-editable PivotTable will be automatically repainted if CollectionDatasource is changed.

For non-editable PivotTable we cannot bring this functionality because customized filters / views now are not sent to a server and they will be reset if we repaint PivotTable. As I said all filtering and aggregation performed in your browser so PivotTable fetches all the data provided by a datasource (not all the data from DB), that means you can also use PivotTable with non-persistent entities.

:ticket: See the following issue in our bug tracker: