public Component generateNoCell(ReportDetail entity) {
Table.PlainTextCell cell = new Table.PlainTextCell(String.valueOf(reportDetailsDl.getContainer().getItemIndex(entity.getId()) + 1));
return cell;


试试给列设置一个 ValueProvider ,Column.setValueProvider

         * Sets value provider for the column. Value provider can be called 0 or more times depending on visibility
         * of a cell and value type. Return type must be the same as {@link #getType()} of the column.
         * @param valueProvider a callback interface for providing column values from a given source
        public void setValueProvider(Function<T, Object> valueProvider) {
            this.valueProvider = valueProvider;