Table with aggregation problem

Hi,

in a table with aggregatable = true and SUM aggregation in a column, if in the table is also present a
setIconProvider the total is misaligned in the previous column.

If i comment the setIconProvider all is ok so i think it’s a bug … or I’m doing something wrong.

I would also like to ask if it is possible to get the aggregation sum for a column added with addGeneratedColumn.

Thank you.

Maurizio.

Hello, Maurizio!

Thank you for reporting the problem. We have created a YouTrack issue, see the link on the right.

You can define a custom aggregation strategy by implementing the AggregationStrategy interface and passing it to the setAggregation() method of the Table.Column class inside the AggregationInfo instance. You can read about it in the documentation, see info about AggregationStrategy. The only limitation is that your generated column must correspond to some MetaPropertyPath.

Regards,

Gleb

HI Gleb,

I tried to implement AggregationStrategy class as you suggested.
I followed the example in the documentation, but I always get the Collection propertyValues empty so my total is 0.

You have a simple example of application with AggregationStrategy?

So I can understand where I’m wrong.

Thank you.

Maurizio.

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

https://youtrack.cuba-platform.com/issue/PL-8405