simplePagination and ExcelExport doesnt work in some cases

Hi,
I have a simple table with a simplePagination, itemsPerPageDefaultValue=100. The table have the standard ExcelExport-Action from jmix. Now following issue:

The dataset has only 65 rows, click on ExcelReport-Button creates the dialog if you want to export alle rows or only current page. As long as you click on current page it works fine. However, if you select ‘all rows’ this creates an arrayoutofbound at least in firefox and chrome. In Edge it worked fine also with all rows. Sounds for me like a bug in the framework.

Any ideas?

Thank you and regards
Hans

Hi,

Which Jmix version do you use? Please, provide the full stacktrace of the exception.

Jmix Version 1.5.2

Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0
	at java.base/java.util.Vector.elementData(Vector.java:762) ~[na:na]
	at java.base/java.util.Vector.get(Vector.java:783) ~[na:na]
	at io.jmix.gridexportui.exporter.excel.AllRecordsExporter.lambda$exportAll$0(AllRecordsExporter.java:143) ~[jmix-gridexport-ui-1.5.2.jar!/:na]
	at org.springframework.transaction.support.TransactionOperations.lambda$executeWithoutResult$0(TransactionOperations.java:68) ~[spring-tx-5.3.26.jar!/:5.3.26]
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.26.jar!/:5.3.26]
	at org.springframework.transaction.support.TransactionOperations.executeWithoutResult(TransactionOperations.java:67) ~[spring-tx-5.3.26.jar!/:5.3.26]
	at io.jmix.gridexportui.exporter.excel.AllRecordsExporter.exportAll(AllRecordsExporter.java:122) ~[jmix-gridexport-ui-1.5.2.jar!/:na]
	at io.jmix.gridexportui.exporter.excel.ExcelExporter.exportTable(ExcelExporter.java:247) ~[jmix-gridexport-ui-1.5.2.jar!/:na]
	at io.jmix.gridexportui.action.ExportAction.doExport(ExportAction.java:194) ~[jmix-gridexport-ui-1.5.2.jar!/:na]
	at io.jmix.gridexportui.action.ExportAction$1.actionPerform(ExportAction.java:145) ~[jmix-gridexport-ui-1.5.2.jar!/:na]
	at io.jmix.ui.sys.DialogsImpl$OptionDialogBuilderImpl.lambda$show$0(DialogsImpl.java:344) ~[jmix-ui-1.5.2.jar!/:na]
	at io.jmix.ui.widget.JmixButton.fireClick(JmixButton.java:77) ~[jmix-ui-1.5.2.jar!/:na]
	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.14.3-3-jmix.jar!/:8.14.3-3-jmix]

Do you have any filter condition applied? it seems that you’re talking about this issue. This fix will appear in Jmix 1.5.3

Well, the dataset in the table is a result of a filter. Any plans when 1.5.3 will be released?

Strange for me that the browser act different but if 1.5.3 give the fix, all good.

Thx

We have no specific plans yet. Probably, in July.