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 b1f853beb89ba955506eb43270203e689ae5c4d8 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Oct 16 09:45:19 2015 +0200 mise en place de la validation (refs #7602) --- .../table/impl/seine/ObjectObservedSpeciesUI.jaxx | 2 +- ...servedSpeciesDto-n1-update-error-validation.xml | 77 ++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx index 1a4f028..4de6832 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/seine/ObjectObservedSpeciesUI.jaxx @@ -66,7 +66,7 @@ autoField='true' beanClass='fr.ird.observe.services.dto.seine.FloatingObjectObservedSpeciesDto' errorTableModel='{getErrorTableModel()}' - context='n1-update-objectObservedSpecies'/> + 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/ObjectObservedSpeciesDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/ObjectObservedSpeciesDto-n1-update-error-validation.xml new file mode 100644 index 0000000..0f46753 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/ObjectObservedSpeciesDto-n1-update-error-validation.xml @@ -0,0 +1,77 @@ +<?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="species"> + + <!-- pas de species selectionnee --> + <field-validator type="required" short-circuit="true"> + <message>validator.objectObservedSpecies.required.species</message> + </field-validator> + + <!-- species desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ species.enabled ]]> + </param> + <message>validator.objectObservedSpecies.desactivated.species</message> + </field-validator> + + </field> + + <field name="speciesStatus"> + + <!-- pas de status species selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.objectObservedSpecies.required.speciesStatus</message> + </field-validator> + + <!-- speciesStatus desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ speciesStatus.enabled ]]> + </param> + <message>validator.objectObservedSpecies.desactivated.speciesStatus</message> + </field-validator> + + </field> + + <field name="count"> + + <!-- count non renseigné --> + <field-validator type="required" short-circuit="true"> + <message>validator.objectObservedSpecies.required.count</message> + </field-validator> + + <!-- count strictement positif --> + <field-validator type="int" short-circuit="true"> + <param name="min">1</param> + <message>validator.objectObservedSpecies.positive.count</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>.