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.
editable table
How can I get the content of the edited fields after that I set the table isEditable(true);
I tried to read so many examples but none of them take the edited data.
could someone plz help me because I tried alot !!! thank u !!!
Table editMode is quite limited:
- There is no good way of forcing the textfields in the table to be immediate - events will be sent when something else communicates with the server (one scrolls table for example)
- There is no listener in the table directly for listening to value change events in the container properties.
Here is a simple example on how to construct a container outside the table and listen to property changes in that.
IndexedContainer container = new IndexedContainer();
container.addContainerProperty("name", String.class, "");
for (int i = 0; i < 500; i++) {
Integer rowid = new Integer(i);
container.addItem(rowid);
container.getContainerProperty(rowid, "name").setValue("Row " + i);
}
container.addListener(new Property.ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
Property p = event.getProperty();
mainWindow.showNotification("A row was changed to " + p);
}
});
Table t = new Table(null, container);
t.setEditable(true);
Because editMode is quite limited, you might want to consider not using it and using a generated column instead.
Thank u very much !!! but can u plz show me an example pf how to use generated columns ??!!
Thank u again =)
Mariam Ahmed Abou-Elfadl: Thank u very much !!! but can u plz show me an example pf how to use generated columns ??!!
Thank u again =)
http://vaadin.com/book/-/page/components.table.html#components.table.columngenerator