list.getMhsTable().addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
if (event.getProperty().getValue() != null) {
Object mhsId = event.getProperty().getValue();
Mahasiswa selectedMahasiswa = createEntityManager().find(Mahasiswa.class, mhsId);
form.setMahasiswa(selectedMahasiswa);
} else {
form.clear();
}
}