Hello:
on my table I have created a text field as follows
public class myTable extends Table implements ValueChangeListener {
public myTable(MyApplication app) {
setSizeFull();
this.app = app;
setStyleName(Reindeer.TABLE_STRONG);
setSelectable(true);
setImmediate(true);
addListener((ValueChangeListener) this);
//is column here create
[b]
addContainerProperty("Caracteristica", TextField.class, null);
[/b]
setNullSelectionAllowed(false);
}
my function generate textfield
public void setCompTabla(){
this.addGeneratedColumn("Caracteristica", new Table.ColumnGenerator() {
public Component generateCell(Table source, Object itemId,
Object columnId) {
VerticalLayout layout = new VerticalLayout();
final TextField textField = new TextField();
layout.addComponent(textField);
return layout ;
}
work fine, but need reference using ValueChange in table
@Override
public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
Item item = this.getItem(this.getValue());
//need reference textfield here ???
}
}
help