示例#1
0
 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();
   }
 }
示例#2
0
  @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) {

      }
    }
  }
示例#3
0
 private void deleteForm(FieldGroup binder) {
   contentTypeService.delete(getUpdateEntity(binder));
   getHome();
 }