private void saveEditedForm(FieldGroup binder) { try { binder.commit(); contentTypeService.update(getUpdateEntity(binder)); getHome(); Notification.show("Record UPDATED!", Notification.Type.HUMANIZED_MESSAGE); } catch (FieldGroup.CommitException e) { Notification.show("Values MISSING!", Notification.Type.HUMANIZED_MESSAGE); getHome(); } }
@Override public void valueChange(Property.ValueChangeEvent event) { final Property property = event.getProperty(); if (property == table) { try { final ContentType contentType = contentTypeService.findById(table.getValue().toString()); final ContentTypeModel bean = getModel(contentType); form.binder.setItemDataSource(new BeanItem<>(bean)); setReadFormProperties(); } catch (Exception r) { } } }
private void deleteForm(FieldGroup binder) { contentTypeService.delete(getUpdateEntity(binder)); getHome(); }