From 2585b38af339658b2c27230e7ae63a78bdd2e41b Mon Sep 17 00:00:00 2001 From: dahoud Date: Sat, 29 Nov 2025 19:19:10 +0000 Subject: [PATCH] =?UTF-8?q?feat(client):=20Cr=C3=A9ation=20du=20composant?= =?UTF-8?q?=20button-form-submit.xhtml=20pour=20les=20actions=20backend=20?= =?UTF-8?q?(DRY/WOU)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nouveau composant button-form-submit.xhtml pour les boutons de soumission de formulaire - Utilise ui:decorate avec ui:define pour passer l'expression de méthode action - Supporte tous les attributs PrimeFaces : update, process, oncomplete, validateClient - Paramètre severity pour les différents styles (success, secondary, warning, danger) - Application dans nouvelle.xhtml et liste.xhtml (dialogue de modification) - Respecte les conventions PrimeFaces et évite les erreurs EL Cette approche permet de réutiliser le composant tout en passant correctement les expressions de méthode via ui:define au lieu de ui:param. --- .../pages/secure/organisation/liste.xhtml | 18 ++++--- .../pages/secure/organisation/nouvelle.xhtml | 16 ++++--- .../buttons/button-form-submit.xhtml | 47 +++++++++++++++++++ 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/templates/components/buttons/button-form-submit.xhtml diff --git a/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/liste.xhtml b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/liste.xhtml index 254dcc2..4ea9b94 100644 --- a/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/liste.xhtml +++ b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/liste.xhtml @@ -224,17 +224,23 @@ + - + + + + + + + + + #{organisationsBean.modifierOrganisation} + + diff --git a/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/nouvelle.xhtml b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/nouvelle.xhtml index cc6ad2d..2486a79 100644 --- a/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/nouvelle.xhtml +++ b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/pages/secure/organisation/nouvelle.xhtml @@ -48,12 +48,16 @@ - - + + + + + + + + #{organisationsBean.creerOrganisation} + + diff --git a/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/templates/components/buttons/button-form-submit.xhtml b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/templates/components/buttons/button-form-submit.xhtml new file mode 100644 index 0000000..c97b629 --- /dev/null +++ b/unionflow-client-quarkus-primefaces-freya/src/main/resources/META-INF/resources/templates/components/buttons/button-form-submit.xhtml @@ -0,0 +1,47 @@ + + + + + + +