@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(); } }
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(); } }
private void deleteForm(FieldGroup binder) { OperatingCostFacade.getOperatingCostService().delete(getEntity(binder)); getHome(); }