From 79ddf61c26adfa38fd488094331d2965d086f9df Mon Sep 17 00:00:00 2001 From: Dorian Nemec Date: Thu, 16 May 2024 16:28:11 +0200 Subject: [PATCH] #7 Nicht fertig: Locked Treatment UI --- .../de/hitec/nhplus/treatment/LockedTreatmentController.java | 5 +++++ 1 file changed, 5 insertions(+) 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() {