The Total Tag
The "total" tag, which is required to be bodiless, allows simpler aggregation
operations, without "group by" properties, and specifying only one aggregate value.
Attributes
- The "total" tag supports all base tag attributes.
- items: List Required. This is the List of items
to aggregate.
- value: String Required. This is exactly one aggregator
specification string, e.g. "Avg(price)". This represents the aggregate
operation to perform on the list of values.
- parallel: int Optional. Specify a degree of parallelism
directly to the jAgg library. Default: 1
The Aggregators specified in the "value" attribute may be an Aggregator,
either built-in to the jAgg library, or
custom built by the developer.
The "total" tag is an alternate version of the
Aggregate Expression.
Example
A List of Employees is available in the beans map. There
are 4 employees, but only 2 of them have a non-null manager.
<jt:total items="${employees}" value="Count(manager)"/> |
...gets transformed into...