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=new BeanItemContainer(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.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…