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.
Problem with Updateing a record in a table
hi all,
i trying to develop a spring with vaadin application. In this im using JPA. I have a table that displays all the data getting from database. When I try to update the record in the table I got null Item. this is my code.
BeanItemContainer<Institution> institution=new BeanItemContainer<Institution>(Institution.class);
institution.addAll(institutionsList);
Table institutionTable=new Table("",institution);
institutionTable.setSelectable(true);
institutionTable.setImmediate(true);
institutionTable.setSizeFull();
institutionTable.setVisibleColumns(new Object[] { "id", "instCode","instName", "instStatus"});
institutionTable.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
setModificationsEnabled(event.getProperty().getValue() != null);
}
private void setModificationsEnabled(boolean b) {
editButton.setVisible(b);
deleteButton.setVisible(b);
}
});
After selecting the record on the table, I press the edit button the following code will be executed..............
panel.getApplication().getMainWindow().addWindow(new InstitutionEditor((BeanItem<Institution>)institution.getItem(institutionTable.getValue())));
here institutionTable.getValue() get the value but getItem() gives null value..............
and the window is displayed without fields and only with update and cancel button only..........please help me...........
thanks in advance..........................