Exemplo n.º 1
0
 @Override
 public void valueChange(Property.ValueChangeEvent event) {
   final Property property = event.getProperty();
   if (property == table) {
     final OperatingCost operatingCosts =
         OperatingCostFacade.getOperatingCostService().findById(table.getValue().toString());
     form.binder.setItemDataSource(new BeanItem<>(getBean(operatingCosts)));
     setReadFormProperties();
   }
 }
Exemplo n.º 2
0
 private void saveEditedForm(FieldGroup binder) {
   try {
     binder.commit();
     OperatingCostFacade.getOperatingCostService().merge(getEntity(binder));
     getHome();
     Notification.show("Record UPDATED!", Notification.Type.TRAY_NOTIFICATION);
   } catch (FieldGroup.CommitException e) {
     Notification.show("Values MISSING!", Notification.Type.TRAY_NOTIFICATION);
     getHome();
   }
 }
Exemplo n.º 3
0
 private void deleteForm(FieldGroup binder) {
   OperatingCostFacade.getOperatingCostService().delete(getEntity(binder));
   getHome();
 }