Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Addressbook tutorial, question about NATURAL_COL_ORDER
I am sorry, but I have another stupid question to ask:
I went through each step of the Addressbook Tutorial. I typed all of the code myself instead of downloading oder copy / pasting it, to get a feel for it, except for the PersonContainer class. Now I am stuck at chapter 4.4 because my application complaining about an IllegalArgumentException: Ids must exist in the Container of as a generated column, missing id: email.
Very well, since I created the Person class myself, my variable storing the e-mail address is named slightly different. But changing its name accordingly, in the Person class or int the NATURAL_COL_ORDER array has no effect.
I changed 'firstName' in NATURAL_COL_ORDER to 'first' and produced another IllegalArgumentException, as expected. But it seem, that I can not change this ID anywhere, to make it match to 'first' in any of my clases. The value 'firstName' is insisted. Where can this be defined? Where are the items in NATURAL_COL_ORDER matched against?
Regards
Kolja
Table.setVisibleColumns() expects an array of property ids. The BeanItemContainer used in the tutorial contains propertyIds taken from the beans (based on the getter method names IIRC) so if the getter is getEmail() the property id is "email". If you change the getter for firstName to getFirst() then "first" in the NATURAL_COL_ORDER array should work.
Artur Signell: The BeanItemContainer used in the tutorial contains propertyIds taken from the beans (based on the getter method names IIRC) so if the getter is getEmail() the property id is "email". If you change the getter for firstName to getFirst() then "first" in the NATURAL_COL_ORDER array should work.
That is why renaming my class fields is ineffective. Thanks for pointing this out.
Regards
Kolja