This is an automated email from the git hooks/post-receive script. New commit to branch feature/7619 in repository observe. See http://git.codelutin.com/observe.git commit fe6c58456937f14b983ec9eb037e581be2c2c811 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:34:30 2015 +0200 ajout des validateurs (refs #7619) --- .../content/table/impl/longline/SensorUsedUI.jaxx | 2 +- ...ineSensorUsedDto-n1-update-error-validation.xml | 39 ++++++++++++ .../SensorUsedDto-n1-update-error-validation.xml | 72 ++++++++++++++++++++++ .../SensorUsedDto-n1-update-warning-validation.xml | 39 ++++++++++++ 4 files changed, 151 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx index 92599e3..30bf5a6 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx @@ -62,7 +62,7 @@ <ContentTableModel id='tableModel'/> <!-- le validateur de l'écran --> - <BeanValidator id='validator' autoField='true' context='n1-update-sensorUsed' + <BeanValidator id='validator' autoField='true' context='n1-update' beanClass='fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto' errorTableModel='{getErrorTableModel()}'/> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml new file mode 100644 index 0000000..e0387a2 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml @@ -0,0 +1,39 @@ +<?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="comment"> + + <!-- comentaire de moins de 1024 caractères --> + <field-validator type="stringlength"> + <param name="maxLength">1024</param> + <message>validator.activity.comment.tobig</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml new file mode 100644 index 0000000..a7e3292 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml @@ -0,0 +1,72 @@ +<?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="sensorType"> + + <!-- pas de sensorType selectionnee --> + <field-validator type="required" short-circuit="true"> + <message>validator.sensorUsed.required.sensorType</message> + </field-validator> + + <!-- sensorType desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorType.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorType</message> + </field-validator> + + </field> + + <field name="sensorDataFormat"> + + <!-- sensorDataFormat desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorDataFormat == null || sensorDataFormat.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorDataFormat</message> + </field-validator> + + </field> + + <field name="sensorBrand"> + + <!-- sensorBrand desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorBrand == null || sensorBrand.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorBrand</message> + </field-validator> + + </field> + + + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml new file mode 100644 index 0000000..3ed781f --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml @@ -0,0 +1,39 @@ +<?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="sensorSerialNo"> + + <!-- sensorSerialNo non renseigné --> + <field-validator type="required" short-circuit="true"> + <message>validator.sensorUsed.null.sensorSerialNo</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>.