I’m trying the tutorial available on vaadin’s website and when I was setting the item selection on a table’s row the tutorial suggests that I should add the following line to my table class.
addListener((Property.ValueChangeListener), app);
Being app a reference to my controller. However eclipse points an error to Property.ValueChangeListener “Property.ValueChangeListener cannot be resolved to a variable”.
What exactly am I doing wrong here ?
PS: My believe my imports are correct since eclipse’s auto-complete was working just fine to identify .ValueChangeListener
PersonList Class:
package com.example.simpleaddressbook2;
import com.vaadin.data.Property;
import com.vaadin.ui.Table;
public class PersonList extends Table {
public PersonList(Simpleaddressbook2Application app){
setSizeFull();
setContainerDataSource(app.getDataSource());
setVisibleColumns(PersonContainer.NATURAL_COL_ORDER);
setColumnHeaders(PersonContainer.COL_HEADERS_ENGLISH);
setSelectable(true);
setImmediate(true);
addListener((Property.ValueChangeListener), app);
setNullSelectionAllowed(false);
}
}
Found what was wrong, the correct code is :
and not
Damn comma !