PDA

View Full Version : AggregationRowConfig and setModel



francescoNemesi
25 Jan 2012, 7:56 AM
Hi,

I have a grid with an AggregationRow, I calculate the values to display on the server side, so I use

AggregationRowConfig<...> arc = new AggregationRowConfig<...>();
arc.setModel(myAggregatedModel);

This way I want the aggregation row to display my precalculated total.

The problem is that no data is shown unless I also do

arc.setSummaryType(SummaryType.SUM (or any other SummaryType))

but by doing that "myAggregatedModel" is ignored and the values in the aggregation row are calculated at run time, which completely defeats the point of precalculating the aggregation server side.

Can anybody help?

Thanks

francescoNemesi
26 Jan 2012, 12:51 AM
The problem was due to wrong logic in my code, the totalModel was always null.

fixed.