@FXML private void handleAfficherObjectif() { Chapitre selectedChapitre = chapitreDisplayChapitreTable.getSelectionModel().getSelectedItem(); if (selectedChapitre != null) { showObjectifDialog(selectedChapitre.getId()); } else { // Nothing selected. Alert alert = new Alert(AlertType.WARNING); alert.initOwner(primaryStage); alert.setTitle("No Selection"); alert.setHeaderText("No Chapitre Selected"); alert.setContentText("Please select a cours in the table."); alert.showAndWait(); } }
@FXML private void handleEditChapitre() { Chapitre selectedChapitre = chapitreDisplayChapitreTable.getSelectionModel().getSelectedItem(); if (selectedChapitre != null) { boolean modifierClicked = showChapitreEditDialog(selectedChapitre); if (modifierClicked) { showChapitreDetails(selectedChapitre); } } else { // Nothing selected. Alert alert = new Alert(AlertType.WARNING); alert.initOwner(primaryStage); alert.setTitle("No Selection"); alert.setHeaderText("No Chapitre Selected"); alert.setContentText("Please select a cours in the table."); alert.showAndWait(); } }