Do not select any items in table and try to show pivot
Actual behavior
NPE is ocurred:
ava.lang.NullPointerException
at com.haulmont.charts.gui.components.action.ShowPivotAction.showPivotTable(ShowPivotAction.java:161)
at com.haulmont.charts.gui.components.action.ShowPivotAction.actionPerform(ShowPivotAction.java:136)
at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:62)
Changes
In order to support new data containers created new ShowPivotAction and PivotScreenBuilder.
ShowPivotAction
ShowPivotAction has FQN com.haulmont.charts.gui.components.action.list.ShowPivotAction.
It has ActionType annotation which allows to use this action from screen layout:
Environment
Description of the bug or enhancement
Changes
In order to support new data containers created new ShowPivotAction and PivotScreenBuilder.
ShowPivotAction
ShowPivotAction has FQN
com.haulmont.charts.gui.components.action.list.ShowPivotAction
. It hasActionType
annotation which allows to use this action from screen layout:In this case
ShowPivotAction
will show all available properties in pivot table according to his action rules.PivotScreenBuilder
PivotScreenBuilder is a spring bean, which provides API for configuring pivot table and selecting specific properties.
It has the same API as old ShowPivotAction
For QA
withIncludedProperties()
and add property with property path (e.g. "customer.name")You can try this project: showpivotdemo.zip