I’m currently migrating an Application to Vaadin8. I hit a roadblock as I wanted to store/load the properties of grid columns (width, sortorder, hiden, columnorder). Before Vaadin8 every column had a propertyId, which could be used to identify the column.
With Vaadin 8 it seems that there are two cases.
- The grid was created using a bean. Than Column.getId() is the propertyName, which should work
- The column was added manually by providing a value Provider. Than Column.getId() is null and I can’t find any other identifier that i could us
The index of the column can’t be used because it depends on the column order. Even accessing Grid.columnKeys via reflection is not even really an option because the columnKeys seem to be auto generated based on the order the columns are added. So if the columns aren’t fixed they can have “random” columnKeys.
Is there any other way to uniquely identify a column?