diff --git a/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java b/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java index e79490a..3ed77bf 100644 --- a/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java +++ b/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java @@ -13,6 +13,7 @@ import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import java.sql.SQLException; @@ -27,6 +28,8 @@ public class LockedTreatmentController { @FXML public Button buttonUnlock; @FXML + public TableView tableView; + @FXML public TableColumn columnId; @FXML public TableColumn columnFirstName; @@ -45,12 +48,14 @@ public class LockedTreatmentController { * that is called after the binding of all the fields. */ public void initialize(){ + this.readAllAndShowInTableView(); this.columnId.setCellValueFactory(new PropertyValueFactory<>("id")); this.columnFirstName.setCellValueFactory(new PropertyValueFactory<>("firstName")); this.columnSurName.setCellValueFactory(new PropertyValueFactory<>("surName")); this.columnDeleteDate.setCellValueFactory(cellData -> new SimpleStringProperty("coming soon")); + this.tableView.setItems(this.treatments); } private void readAllAndShowInTableView() {