This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 3f36f41439b6749cd26d7893c66e45cf851cad52 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 13 12:09:34 2015 +0200 ajout de la validation (refs #7589) --- .../table/impl/seine/GearUseFeaturesSeineUI.jaxx | 2 +- ...FeaturesSeineDto-n1-update-error-validation.xml | 55 ++++++++++++++++++++++ ...eineGearUseDto-n1-update-warning-validation.xml | 41 ++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx index f382295..36c4d74 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/GearUseFeaturesSeineUI.jaxx @@ -69,7 +69,7 @@ <BeanValidator id='validator' beanClass='fr.ird.observe.services.dto.seine.TripSeineGearUseDto' errorTableModel='{getErrorTableModel()}' - context='n1-update-gearUseFeatures'/> + context='n1-update'/> <!-- le validateur d'une entrée de tableau --> <BeanValidator id='validatorTable' diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/GearUseFeaturesSeineDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/GearUseFeaturesSeineDto-n1-update-error-validation.xml new file mode 100644 index 0000000..036af1a --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/GearUseFeaturesSeineDto-n1-update-error-validation.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="gear"> + + <!-- pas d'équipement selectionnee --> + <field-validator type="required" short-circuit="true"> + <message>validator.gearUseFeature.required.gear</message> + </field-validator> + + <!-- équipement desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ gear.enabled ]]> + </param> + <message>validator.gearUseFeature.desactivated.gear</message> + </field-validator> + + </field> + + <field name="number"> + + <!-- number non saisi --> + <field-validator type="required" short-circuit="true"> + <message>validator.gearUseFeature.required.number</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineGearUseDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineGearUseDto-n1-update-warning-validation.xml new file mode 100644 index 0000000..ae611d7 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineGearUseDto-n1-update-warning-validation.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="gearUseFeaturesSeine"> + + <!-- pas d'équipement --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ gearUseFeaturesSeine != null && !gearUseFeaturesSeine.empty ]]> + </param> + <message>validator.trip.null.gearUseFeature</message> + </field-validator> + + </field> + +</validators> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.