fieldGroup.setItemDataSource(beanItem);
}
private void buildForm() {
fieldGroup = new PersistenceFieldGroup(beanItem);
fieldGroup.setFieldFactory(new PersistenceFieldGroupFieldFactory());
formLayout.addComponent(nimField = fieldGroup.buildAndBind("NIM", "NIM"));
nimField.addValidator(new BeanValidator(Mahasiswa.class, "NIM"));
((TextField) nimField).setNullRepresentation("");
((TextField) nimField).setInputPrompt("9 digit Nomor Induk Mahasiswa");