From b3d0580439b9a00c7eb918085de1694151066004 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 16:02:49 +0000
Subject: [PATCH] rename packages

---
 fdx_convert/src/main/java/com/megatim/fdxconvert/controller/search/TacheSearchFormController.java |   81 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/fdx_convert/src/main/java/com/megatim/fdxconvert/controller/search/TacheSearchFormController.java b/fdx_convert/src/main/java/com/megatim/fdxconvert/controller/search/TacheSearchFormController.java
new file mode 100644
index 0000000..ab00314
--- /dev/null
+++ b/fdx_convert/src/main/java/com/megatim/fdxconvert/controller/search/TacheSearchFormController.java
@@ -0,0 +1,81 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package com.megatim.fdxconvert.controller.search;
+
+import com.megatimfx.common.annontations.Search;
+import com.megatimfx.common.customcontrols.AbstractSelectionItem;
+import com.megatimfx.common.customdialogs.LoadinIndicatorDialogUtil;
+import com.megatimfx.common.enums.Operateur;
+import com.megatimfx.components.customdialogs.AlertMessageUtil;
+import com.megatim.fdxconvert.controller.table.TypeFichierTable;
+import com.megatim.fdxconvert.model.TypeFichier;
+import com.megatim.fdxconvert.service.TypeFichierService;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.ResourceBundle;
+import java.util.Set;
+import javafx.concurrent.Task;
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.util.Pair;
+
+/**
+ *
+ * @author ASUS
+ */
+public class TacheSearchFormController implements Initializable {
+
+    @FXML
+    @Search(fieldName = "typeFichier", operateur = Operateur.EQUALS)
+    private AbstractSelectionItem typeFichierAbstractSelectItem;
+    
+    private Set<TypeFichier> TypeFichierSet = new HashSet<>();
+
+    @Override
+    public void initialize(URL location, ResourceBundle resources) {
+        intitTypeFichiers();
+    }
+
+    private void intitTypeFichiers() {
+
+        typeFichierAbstractSelectItem.setTitle("Choix du type de fichier de la tâche");
+
+        typeFichierAbstractSelectItem.setColumns(Arrays.asList(
+                TypeFichierTable.codeColumn(),
+                TypeFichierTable.libelleColumn(),
+                TypeFichierTable.participantColumn()
+        ));
+
+        typeFichierAbstractSelectItem.setSearchFieldPairs(Arrays.asList(
+                new Pair<>("code", "Code"),
+                new Pair<>("libelle", "Libellé")
+        ));
+
+        Task<Void> task = new Task() {
+            @Override
+            protected Object call() throws Exception {
+                TypeFichierSet.clear();
+                TypeFichierSet.addAll(TypeFichierService.getInstance().getAll());
+                return null;
+            }
+        };
+        task.setOnRunning(e -> LoadinIndicatorDialogUtil.getLoadingIndicatorDialog().show());
+        task.setOnSucceeded(e -> {
+
+            LoadinIndicatorDialogUtil.getLoadingIndicatorDialog().hide();
+            typeFichierAbstractSelectItem.setElements(TypeFichierSet);
+
+        });
+        task.setOnFailed(e -> {
+            LoadinIndicatorDialogUtil.getLoadingIndicatorDialog().hide();
+            AlertMessageUtil.showAlertException(task.getException(), "Une exception s'est produite pendant le traitement", "Erreur");
+        });
+        Thread thread = new Thread(task);
+        thread.setDaemon(true);
+        thread.start();
+
+    }
+}

--
Gitblit v1.10.0