Can't get Vaadin grid examples to compile


I’m following but can’t get past the line:

// Use the component constructor that accepts an item ->
// new PersonComponent(Person person)


Error:(121, 38) java: incompatible types: invalid constructor reference
incompatible types: java.lang.Object cannot be converted to Person


Have anyone else this problem or does the demos work for you?


Are you using the Grid as Grid<Person> and did you copy the objects from the bottom of # Grid example model (Person and Address)

Next you would want to copy the objects PersonComponent and PersonCard from the

By doing these steps the only thing that’s not there for me is: createItems()
This method only creates a List of 500 Person beans.

  • Mikael

Hi Mikael,
I have my own Person object. It looks the same but without “static” as my JDK8 environment didn’t allow it…

Yes the static needs to be dropped if it’s in its own file.
The static is there as for the demo it is a nested class inside the Demo class.

  • Mikael