When numeric data are listed in a <p:dataTable>
(or <h:dataTable>
), is there any way to get the total sum in the summary row in table's footer without calculating it in the backing bean and providing it as again another bean property?
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- h:selectOneMenu in p:dataTable doesn't submit
- PrimeFaces block UI does not work when the compone
相关文章
- System.OutOfMemoryException:“数组维度超过了支持的范围。”
- Sum multidimensional array C#
- Comparing string and boolean in Expression languag
- How to allow numbers only using f:validateRegex
- Selecting all visible rows after a search using
- JSF 2.0: ajax request when press ENTER
- how to disable show entries property in jquery dat
- Formatting a double in JSF
If your environment supports Java EE 7's new EL 3.0 (e.g. WildFly 8), then you can make use of new support for Java 8-like Stream and Lambda operations in EL (yes, this works even when using Java 7).
In your particular case, you can use the EL 3.0 equivalent of Java 8's
IntStream#sum()
(orDoubleStream#sum()
, depending on property type):