branch develop updated (7d19452 -> 8462307)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git from 7d19452 [LL][PS] Possibilité de saisie directe au clavier des dates/heures sans passer par le calendrier (Fixes #7877) new 644b2a6 Ajout TargetLength.sex (persistence) new 7346b7a Ajout TargetLength.sex (service) new c9d3dfa Ajout TargetLength.sex (ui) new 8462307 Ajout du champ Sexe sur les échantillons de cible (Fixes #8572) Merge branch 'feature/8572' into develop The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 8462307850128601d722dad9fd90a68a8fb8412b Merge: 7d19452 c9d3dfa Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:28 2016 +0100 Ajout du champ Sexe sur les échantillons de cible (Fixes #8572) Merge branch 'feature/8572' into develop commit c9d3dfad77b31bb06507d8320a80dc3d7af3cd80 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:21 2016 +0100 Ajout TargetLength.sex (ui) commit 7346b7a63156afcca29a6421c64726440f8c50a9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:18 2016 +0100 Ajout TargetLength.sex (service) commit 644b2a66bfaf6ebddb4798b43e2257cc4d4e08fc Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:15 2016 +0100 Ajout TargetLength.sex (persistence) Summary of changes: .../TargetLengthDto-ui-update-error-validation.xml | 12 ++++++++++++ .../application-swing-validation_en_GB.properties | 1 + .../application-swing-validation_es_ES.properties | 1 + .../application-swing-validation_fr_FR.properties | 1 + .../content/table/impl/seine/AbstractSampleUI.jcss | 21 ++++++++++++++++++--- .../table/impl/seine/NonTargetSampleUI.jcss | 10 ---------- .../content/table/impl/seine/TargetSampleUI.jaxx | 11 +++++++++++ .../table/impl/seine/TargetSampleUIHandler.java | 8 ++++++-- .../table/impl/seine/TargetSampleUIModel.java | 2 ++ .../i18n/application-swing_en_GB.properties | 2 ++ .../i18n/application-swing_es_ES.properties | 2 ++ .../i18n/application-swing_fr_FR.properties | 2 ++ .../DataSourceMigrationForVersion_5_1.java | 1 + .../V5_1_09_evol_7877_targetLength_add_sex-H2.sql | 2 ++ .../V5_1_09_evol_7877_targetLength_add_sex-PG.sql | 2 ++ entities/src/main/xmi/observe-seine.zargo | Bin 85633 -> 85870 bytes .../request/ReferenceSetRequestDefinitions.java | 1 + .../src/main/xmi/observe-services-dto-seine.zargo | Bin 59655 -> 59857 bytes services-dto/src/main/xmi/observe-services-dto.ini | 1 + .../TargetLength-service-error-validation.xml | 12 ++++++++++++ .../services-topia-validation_en_GB.properties | 1 + .../services-topia-validation_es_ES.properties | 1 + .../services-topia-validation_fr_FR.properties | 1 + .../topia/binder/data/TargetLengthBinder.java | 4 ++++ 24 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-H2.sql create mode 100644 entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-PG.sql -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 644b2a66bfaf6ebddb4798b43e2257cc4d4e08fc Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:15 2016 +0100 Ajout TargetLength.sex (persistence) --- .../versions/DataSourceMigrationForVersion_5_1.java | 1 + .../V5_1_09_evol_7877_targetLength_add_sex-H2.sql | 2 ++ .../V5_1_09_evol_7877_targetLength_add_sex-PG.sql | 2 ++ entities/src/main/xmi/observe-seine.zargo | Bin 85633 -> 85870 bytes 4 files changed, 5 insertions(+) diff --git a/entities-migration/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_5_1.java b/entities-migration/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_5_1.java index d3ac6b2..ab82bfb 100644 --- a/entities-migration/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_5_1.java +++ b/entities-migration/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_5_1.java @@ -40,6 +40,7 @@ public class DataSourceMigrationForVersion_5_1 extends AbstractObserveMigrationC addScript("06", "evol_8375_setSeine_add_booleans", queries); addScript("07", "evol_8389_rename_source_columns", queries); addScript("08", "evol_8390_measure_type", queries); + addScript("09", "evol_7877_targetLength_add_sex", queries); { List<String> oldIds = topiaSqlSupport.findMultipleResult(new TopiaSqlQuery<String>() { diff --git a/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-H2.sql b/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-H2.sql new file mode 100644 index 0000000..2d7f284 --- /dev/null +++ b/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-H2.sql @@ -0,0 +1,2 @@ +ALTER TABLE observe_seine.targetlength ADD COLUMN sex VARCHAR(255); +ALTER TABLE observe_seine.targetlength ADD CONSTRAINT FK_TARGETLENGTH_SEX FOREIGN KEY(SEX) REFERENCES OBSERVE_COMMON.SEX(topiaid); diff --git a/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-PG.sql b/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-PG.sql new file mode 100644 index 0000000..0b7641e --- /dev/null +++ b/entities-migration/src/main/resources/db/migration/V5_1_09_evol_7877_targetLength_add_sex-PG.sql @@ -0,0 +1,2 @@ +ALTER TABLE observe_seine.targetlength ADD COLUMN sex character varying(255); +ALTER TABLE observe_seine.targetlength ADD CONSTRAINT FK_TARGETLENGTH_SEX FOREIGN KEY(SEX) REFERENCES OBSERVE_COMMON.SEX(topiaid); diff --git a/entities/src/main/xmi/observe-seine.zargo b/entities/src/main/xmi/observe-seine.zargo index da602d4..0cd143b 100644 Binary files a/entities/src/main/xmi/observe-seine.zargo and b/entities/src/main/xmi/observe-seine.zargo differ -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 7346b7a63156afcca29a6421c64726440f8c50a9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:18 2016 +0100 Ajout TargetLength.sex (service) --- .../request/ReferenceSetRequestDefinitions.java | 1 + .../src/main/xmi/observe-services-dto-seine.zargo | Bin 59655 -> 59857 bytes services-dto/src/main/xmi/observe-services-dto.ini | 1 + .../seine/TargetLength-service-error-validation.xml | 12 ++++++++++++ .../i18n/services-topia-validation_en_GB.properties | 1 + .../i18n/services-topia-validation_es_ES.properties | 1 + .../i18n/services-topia-validation_fr_FR.properties | 1 + .../topia/binder/data/TargetLengthBinder.java | 4 ++++ 8 files changed, 21 insertions(+) diff --git a/services-dto/src/main/java/fr/ird/observe/services/dto/reference/request/ReferenceSetRequestDefinitions.java b/services-dto/src/main/java/fr/ird/observe/services/dto/reference/request/ReferenceSetRequestDefinitions.java index 9140968..0b3c4c4 100644 --- a/services-dto/src/main/java/fr/ird/observe/services/dto/reference/request/ReferenceSetRequestDefinitions.java +++ b/services-dto/src/main/java/fr/ird/observe/services/dto/reference/request/ReferenceSetRequestDefinitions.java @@ -336,6 +336,7 @@ public enum ReferenceSetRequestDefinitions { TARGET_SAMPLE_FORM( newBuilder(TargetLengthDto.class) .addKey(TargetLengthDto.PROPERTY_SPECIES, SPECIES) + .addKey(TargetLengthDto.PROPERTY_SEX, SEX) .addKey(TargetLengthDto.PROPERTY_SIZE_MEASURE_TYPE, SIZE_MEASURE_TYPE)), NON_TARGET_SAMPLE_FORM( diff --git a/services-dto/src/main/xmi/observe-services-dto-seine.zargo b/services-dto/src/main/xmi/observe-services-dto-seine.zargo index a4dbe6c..cab12be 100644 Binary files a/services-dto/src/main/xmi/observe-services-dto-seine.zargo and b/services-dto/src/main/xmi/observe-services-dto-seine.zargo differ diff --git a/services-dto/src/main/xmi/observe-services-dto.ini b/services-dto/src/main/xmi/observe-services-dto.ini index 0652591..85ac2f1 100644 --- a/services-dto/src/main/xmi/observe-services-dto.ini +++ b/services-dto/src/main/xmi/observe-services-dto.ini @@ -239,6 +239,7 @@ species.attributeGeneric = fr.ird.observe.services.dto.referential.SpeciesDto weightCategory.attributeGeneric = fr.ird.observe.services.dto.referential.seine.WeightCategoryDto [class fr.ird.observe.services.dto.seine.TargetLength] +sex.attributeGeneric = fr.ird.observe.services.dto.referential.SexDto species.attributeGeneric = fr.ird.observe.services.dto.referential.SpeciesDto sizeMeasureType.attributeGeneric = fr.ird.observe.services.dto.referential.SizeMeasureTypeDto diff --git a/services-topia-validation/src/main/resources/fr/ird/observe/entities/seine/TargetLength-service-error-validation.xml b/services-topia-validation/src/main/resources/fr/ird/observe/entities/seine/TargetLength-service-error-validation.xml index 266addf..c745c23 100644 --- a/services-topia-validation/src/main/resources/fr/ird/observe/entities/seine/TargetLength-service-error-validation.xml +++ b/services-topia-validation/src/main/resources/fr/ird/observe/entities/seine/TargetLength-service-error-validation.xml @@ -26,6 +26,18 @@ "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> + <field name="sex"> + + <!-- sex desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sex == null || sex.enabled ]]> + </param> + <message>validator.service.targetLength.desactivated.sex</message> + </field-validator> + + </field> + <field name="sizeMeasureType"> <!-- pas de sizeMeasureType selectionnee --> diff --git a/services-topia-validation/src/main/resources/i18n/services-topia-validation_en_GB.properties b/services-topia-validation/src/main/resources/i18n/services-topia-validation_en_GB.properties index 90a272e..bb9c670 100644 --- a/services-topia-validation/src/main/resources/i18n/services-topia-validation_en_GB.properties +++ b/services-topia-validation/src/main/resources/i18n/services-topia-validation_en_GB.properties @@ -519,6 +519,7 @@ validator.service.targetDiscarded.required.weightCategory=Weight category must b validator.service.targetDiscarded.uniqueKey=Tuple (category - reasonForDiscard) must be unique. validator.service.targetLength.bound.length=Length must be bound between %s and %s. validator.service.targetLength.bound.weight=Weight must be bound between %s and %s. +validator.service.targetLength.desactivated.sex=Selected sex is disabled. validator.service.targetLength.desactivated.sizeMeasureType=Selected size measure type is disabled. validator.service.targetLength.desactivated.species=Selected species is disabled. validator.service.targetLength.positive.length=Must be a positive number. diff --git a/services-topia-validation/src/main/resources/i18n/services-topia-validation_es_ES.properties b/services-topia-validation/src/main/resources/i18n/services-topia-validation_es_ES.properties index 217ae20..68c434b 100644 --- a/services-topia-validation/src/main/resources/i18n/services-topia-validation_es_ES.properties +++ b/services-topia-validation/src/main/resources/i18n/services-topia-validation_es_ES.properties @@ -519,6 +519,7 @@ validator.service.targetDiscarded.required.weightCategory=Es obligatorio selecci validator.service.targetDiscarded.uniqueKey=El par (categoria - causa del descarte) debe ser única. validator.service.targetLength.bound.length=La talla para esta especie debe estar comprendida entre %1$s y %2$s. validator.service.targetLength.bound.weight=La peso para esta especie debe estar comprendida entre %1$s y %2$s. +validator.service.targetLength.desactivated.sex=El sexo seleccionado está desactivado. validator.service.targetLength.desactivated.sizeMeasureType=Le type de mesure sélectionné est désactivé. \#TODO validator.service.targetLength.desactivated.species=La especie seleccionada está desactivada. validator.service.targetLength.positive.length=La talla debe ser un entero positivo. diff --git a/services-topia-validation/src/main/resources/i18n/services-topia-validation_fr_FR.properties b/services-topia-validation/src/main/resources/i18n/services-topia-validation_fr_FR.properties index f8a91a5..806b8eb 100644 --- a/services-topia-validation/src/main/resources/i18n/services-topia-validation_fr_FR.properties +++ b/services-topia-validation/src/main/resources/i18n/services-topia-validation_fr_FR.properties @@ -519,6 +519,7 @@ validator.service.targetDiscarded.required.weightCategory=La sélection d'une ca validator.service.targetDiscarded.uniqueKey=Le couple (catégorie - raison rejet) doit être unique. validator.service.targetLength.bound.length=La longueur pour cette espèce doit être comprise entre %1$s et %2$s. validator.service.targetLength.bound.weight=Le poids individuel de l'échantillon doit être compris entre %1$s et %2$s. +validator.service.targetLength.desactivated.sex=Le sexe sélectionnée est désactivé. validator.service.targetLength.desactivated.sizeMeasureType=Le type de mesure sélectionné est désactivé. validator.service.targetLength.desactivated.species=L'espèce sélectionnée est désactivée. validator.service.targetLength.positive.length=La longueur est un entier strictement positif. diff --git a/services-topia/src/main/java/fr/ird/observe/services/topia/binder/data/TargetLengthBinder.java b/services-topia/src/main/java/fr/ird/observe/services/topia/binder/data/TargetLengthBinder.java index 9d081e8..b590d6a 100644 --- a/services-topia/src/main/java/fr/ird/observe/services/topia/binder/data/TargetLengthBinder.java +++ b/services-topia/src/main/java/fr/ird/observe/services/topia/binder/data/TargetLengthBinder.java @@ -22,11 +22,13 @@ package fr.ird.observe.services.topia.binder.data; * #L% */ +import fr.ird.observe.entities.referentiel.Sex; import fr.ird.observe.entities.referentiel.SizeMeasureType; import fr.ird.observe.entities.referentiel.Species; import fr.ird.observe.entities.seine.TargetLength; import fr.ird.observe.services.dto.DataReference; import fr.ird.observe.services.dto.constants.ReferentialLocale; +import fr.ird.observe.services.dto.referential.SexDto; import fr.ird.observe.services.dto.referential.SizeMeasureTypeDto; import fr.ird.observe.services.dto.referential.SpeciesDto; import fr.ird.observe.services.dto.seine.TargetLengthDto; @@ -48,6 +50,7 @@ public class TargetLengthBinder extends DataBinderSupport<TargetLength, TargetLe copyDtoDataFieldsToEntity(dto, entity); entity.setSpecies(toEntity(dto.getSpecies(), Species.class)); + entity.setSex(toEntity(dto.getSex(), Sex.class)); entity.setSizeMeasureType(toEntity(dto.getSizeMeasureType(), SizeMeasureType.class)); entity.setLength(dto.getLength()); entity.setIsLengthComputed(dto.isIsLengthComputed()); @@ -64,6 +67,7 @@ public class TargetLengthBinder extends DataBinderSupport<TargetLength, TargetLe copyEntityDataFieldsToDto(entity, dto); dto.setSpecies(toReferentialReference(referentialLocale, entity.getSpecies(), SpeciesDto.class)); + dto.setSex(toReferentialReference(referentialLocale, entity.getSex(), SexDto.class)); dto.setSizeMeasureType(toReferentialReference(referentialLocale,entity.getSizeMeasureType(), SizeMeasureTypeDto.class)); dto.setLength(entity.getLength()); dto.setIsLengthComputed(entity.isIsLengthComputed()); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit c9d3dfad77b31bb06507d8320a80dc3d7af3cd80 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:21 2016 +0100 Ajout TargetLength.sex (ui) --- .../TargetLengthDto-ui-update-error-validation.xml | 12 ++++++++++++ .../application-swing-validation_en_GB.properties | 1 + .../application-swing-validation_es_ES.properties | 1 + .../application-swing-validation_fr_FR.properties | 1 + .../content/table/impl/seine/AbstractSampleUI.jcss | 21 ++++++++++++++++++--- .../content/table/impl/seine/NonTargetSampleUI.jcss | 10 ---------- .../ui/content/table/impl/seine/TargetSampleUI.jaxx | 11 +++++++++++ .../table/impl/seine/TargetSampleUIHandler.java | 8 ++++++-- .../table/impl/seine/TargetSampleUIModel.java | 2 ++ .../i18n/application-swing_en_GB.properties | 2 ++ .../i18n/application-swing_es_ES.properties | 2 ++ .../i18n/application-swing_fr_FR.properties | 2 ++ 12 files changed, 58 insertions(+), 15 deletions(-) diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/TargetLengthDto-ui-update-error-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/TargetLengthDto-ui-update-error-validation.xml index 0fea9ab..a7e461f 100644 --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/TargetLengthDto-ui-update-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/TargetLengthDto-ui-update-error-validation.xml @@ -26,6 +26,18 @@ "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> + <field name="sex"> + + <!-- sex desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sex == null || sex.enabled ]]> + </param> + <message>validator.ui.targetLength.desactivated.sex</message> + </field-validator> + + </field> + <field name="sizeMeasureType"> <!-- pas de sizeMeasureType selectionnee --> diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties index 2d02105..f7dc53b 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties @@ -534,6 +534,7 @@ validator.ui.targetDiscarded.required.weightCategory=Weight category must be fil validator.ui.targetDiscarded.uniqueKey=Tuple (category - reasonForDiscard - brought on deck) must be unique. validator.ui.targetLength.bound.length=Length must be bound between %s and %s. validator.ui.targetLength.bound.weight=Weight must be bound between %s and %s. +validator.ui.targetLength.desactivated.sex=Selected sex is disabled. validator.ui.targetLength.desactivated.sizeMeasureType=Selected size measure type is disabled. validator.ui.targetLength.desactivated.species=Selected species is disabled. validator.ui.targetLength.positive.length=Must be a positive number. diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties index 864e086..7be652c 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties @@ -534,6 +534,7 @@ validator.ui.targetDiscarded.required.weightCategory=Es obligatorio seleccionar validator.ui.targetDiscarded.uniqueKey=El par (categoria - causa del descarte - izado a bordo) debe ser única. validator.ui.targetLength.bound.length=La talla para esta especie debe estar comprendida entre %1$s y %2$s. validator.ui.targetLength.bound.weight=La peso para esta especie debe estar comprendida entre %1$s y %2$s. +validator.ui.targetLength.desactivated.sex=El sexo está desactivado. validator.ui.targetLength.desactivated.sizeMeasureType=Selected size mesure type is disabled. \#TODO validator.ui.targetLength.desactivated.species=La especie seleccionada está desactivada. validator.ui.targetLength.positive.length=La talla debe ser un entero positivo. diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties index c382b79..a906fe4 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties @@ -534,6 +534,7 @@ validator.ui.targetDiscarded.required.weightCategory=La sélection d'une catégo validator.ui.targetDiscarded.uniqueKey=Le couple (catégorie - raison rejet - monté sur le pont) doit être unique. validator.ui.targetLength.bound.length=La longueur pour cette espèce doit être comprise entre %1$s et %2$s. validator.ui.targetLength.bound.weight=Le poids individuel de l'échantillon doit être compris entre %1$s et %2$s. +validator.ui.targetLength.desactivated.sex=Le sexe sélectionné est désactivé. validator.ui.targetLength.desactivated.sizeMeasureType=Le type de mesure sélectionné est désactivé. validator.ui.targetLength.desactivated.species=L'espèce sélectionnée est désactivée. validator.ui.targetLength.positive.length=La longueur est un entier strictement positif. diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss index c208566..8be3504 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/AbstractSampleUI.jcss @@ -38,18 +38,33 @@ JToolBar { } #species { - property:"species"; + property:species; bean:{tableEditBean}; showReset:true; selectedItem:{tableEditBean.getSpecies()}; } +#sexLabel { + text:"observe.common.sex"; + toolTipText:"observe.content.targetSample.table.sex.tip"; + labelFor:{sex}; +} + +#sex { + _entityClass:{SexDto.class}; + property:sex; + bean:{tableEditBean}; + showReset:true; + selectedItem:{tableEditBean.getSex()}; +} + + #lengthLabel { labelFor:{length}; } #length { - property:"length"; + property:length; model:{tableEditBean.getLength()}; useFloat:true; numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL1_PATTERN}; @@ -68,7 +83,7 @@ JToolBar { } #weight { - property:"weight"; + property:weight; model:{tableEditBean.getWeight()}; numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.DECIMAL2_PATTERN}; _validatorLabel:{t("observe.common.weight.ind")}; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss index c526a10..6a54aaf 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetSampleUI.jcss @@ -68,16 +68,6 @@ numberPattern:{fr.ird.observe.application.swing.ui.UIHelper.INT_6_DIGITS_PATTERN}; } -#sexLabel { - text:"observe.common.sex"; - labelFor:{sex}; -} - -#sex { - property:{NonTargetLengthDto.PROPERTY_SEX}; - selectedItem:{tableEditBean.getSex()}; -} - #picturesReferencesLabel { text:"observe.common.picturesReferences"; labelFor:{picturesReferences}; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx index ae3f271..a660b5e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUI.jaxx @@ -32,6 +32,7 @@ fr.ird.observe.application.swing.ui.content.table.impl.seine.ModeSaisieEchantillonEnum fr.ird.observe.services.dto.referential.ReferentialReference fr.ird.observe.services.dto.referential.SpeciesDto + fr.ird.observe.services.dto.referential.SexDto fr.ird.observe.services.dto.referential.SizeMeasureTypeDto fr.ird.observe.application.swing.ui.content.table.* @@ -125,6 +126,16 @@ public String getLengthDataTip(boolean computed) { </cell> </row> + <!-- sex --> + <row> + <cell> + <JLabel id='sexLabel'/> + </cell> + <cell weightx='1' anchor='east'> + <BeanComboBox id='sex' genericType='ReferentialReference<SexDto>' constructorParams='this'/> + </cell> + </row> + <!-- length --> <row> <cell> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIHandler.java index e5b9d83..91f4751 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIHandler.java @@ -30,6 +30,7 @@ import fr.ird.observe.application.swing.ui.content.table.ContentTableUI; import fr.ird.observe.services.dto.Form; import fr.ird.observe.services.dto.referential.ReferentialDto; import fr.ird.observe.services.dto.referential.ReferentialReference; +import fr.ird.observe.services.dto.referential.SexDto; import fr.ird.observe.services.dto.referential.SizeMeasureTypeDto; import fr.ird.observe.services.dto.referential.SizeMeasureTypeHelper; import fr.ird.observe.services.dto.referential.SpeciesDto; @@ -195,6 +196,8 @@ public class TargetSampleUIHandler extends AbstractSampleUIHandler<TargetSampleD table, n("observe.content.targetSample.table.speciesThon"), n("observe.content.targetSample.table.speciesThon.tip"), + n("observe.content.targetSample.table.sex"), + n("observe.content.targetSample.table.sex.tip"), n("observe.content.targetSample.table.sizeMeasureType"), n("observe.content.targetSample.table.sizeMeasureType.tip"), n("observe.content.targetSample.table.length"), @@ -207,11 +210,12 @@ public class TargetSampleUIHandler extends AbstractSampleUIHandler<TargetSampleD n("observe.content.targetSample.table.totalWeight.tip")); UIHelper.setTableColumnRenderer(table, 0, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SpeciesDto.class)); - UIHelper.setTableColumnRenderer(table, 1, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SizeMeasureTypeDto.class)); - UIHelper.setTableColumnRenderer(table, 2, UIHelper.newEmptyNumberTableCellRenderer(renderer)); + UIHelper.setTableColumnRenderer(table, 1, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SexDto.class)); + UIHelper.setTableColumnRenderer(table, 2, UIHelper.newReferentialReferenceDecorateTableCellRenderer(renderer, SizeMeasureTypeDto.class)); UIHelper.setTableColumnRenderer(table, 3, UIHelper.newEmptyNumberTableCellRenderer(renderer)); UIHelper.setTableColumnRenderer(table, 4, UIHelper.newEmptyNumberTableCellRenderer(renderer)); UIHelper.setTableColumnRenderer(table, 5, UIHelper.newEmptyNumberTableCellRenderer(renderer)); + UIHelper.setTableColumnRenderer(table, 6, UIHelper.newEmptyNumberTableCellRenderer(renderer)); } @Override diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIModel.java index e8f06f0..1efdf22 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/TargetSampleUIModel.java @@ -54,6 +54,7 @@ public class TargetSampleUIModel extends ContentTableUIModel<TargetSampleDto, Ta TargetSampleDto.PROPERTY_COMMENT}, new String[]{ TargetLengthDto.PROPERTY_SPECIES, + TargetLengthDto.PROPERTY_SEX, TargetLengthDto.PROPERTY_LENGTH, TargetLengthDto.PROPERTY_IS_LENGTH_COMPUTED, TargetLengthDto.PROPERTY_WEIGHT, @@ -64,6 +65,7 @@ public class TargetSampleUIModel extends ContentTableUIModel<TargetSampleDto, Ta List<ContentTableMeta<TargetLengthDto>> metas = Lists.newArrayList( ContentTableModel.newTableMeta(TargetLengthDto.class, TargetLengthDto.PROPERTY_SPECIES, true), + ContentTableModel.newTableMeta(TargetLengthDto.class, TargetLengthDto.PROPERTY_SEX, true), ContentTableModel.newTableMeta(TargetLengthDto.class, TargetLengthDto.PROPERTY_SIZE_MEASURE_TYPE, true), ContentTableModel.newTableMeta(TargetLengthDto.class, TargetLengthDto.PROPERTY_LENGTH, true), ContentTableModel.newTableMeta(TargetLengthDto.class, TargetLengthDto.PROPERTY_WEIGHT, true), diff --git a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties index 449536f..71ac088 100644 --- a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties +++ b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties @@ -1191,6 +1191,8 @@ observe.content.targetSample.table.length=Length observe.content.targetSample.table.length.tip=Length (cm inf.) observe.content.targetSample.table.meanWeight=Indiv. weight observe.content.targetSample.table.meanWeight.tip=Individual weight (in Kg) +observe.content.targetSample.table.sex=Sex +observe.content.targetSample.table.sex.tip=Sex observe.content.targetSample.table.sizeMeasureType=Measure type observe.content.targetSample.table.sizeMeasureType.tip=Measure type (LF or LD1) observe.content.targetSample.table.speciesThon=Species diff --git a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties index 92d3ad0..c36a56a 100644 --- a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties +++ b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties @@ -1191,6 +1191,8 @@ observe.content.targetSample.table.length=Longitud observe.content.targetSample.table.length.tip=Longitud (cm inf.) observe.content.targetSample.table.meanWeight=Peso ind. observe.content.targetSample.table.meanWeight.tip=Peso individual (en Kg) +observe.content.targetSample.table.sex=Sexo +observe.content.targetSample.table.sex.tip=Sexo observe.content.targetSample.table.sizeMeasureType=Tipo de medición observe.content.targetSample.table.sizeMeasureType.tip=El tipo de medición utilizado (LF ou LD1) observe.content.targetSample.table.speciesThon=Especie de atún diff --git a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties index dfdcecc..6005e77 100644 --- a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties +++ b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties @@ -1191,6 +1191,8 @@ observe.content.targetSample.table.length=Longueur observe.content.targetSample.table.length.tip=Longueur (cm inf.) observe.content.targetSample.table.meanWeight=Poids ind. observe.content.targetSample.table.meanWeight.tip=Poids individuel (en Kg) +observe.content.targetSample.table.sex=Sexe +observe.content.targetSample.table.sex.tip=Sexe observe.content.targetSample.table.sizeMeasureType=Type de mensuration observe.content.targetSample.table.sizeMeasureType.tip=Le type de mensuration utilisé (LF ou LD1) observe.content.targetSample.table.speciesThon=Espèce de thon -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 8462307850128601d722dad9fd90a68a8fb8412b Merge: 7d19452 c9d3dfa Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 13:34:28 2016 +0100 Ajout du champ Sexe sur les échantillons de cible (Fixes #8572) Merge branch 'feature/8572' into develop .../TargetLengthDto-ui-update-error-validation.xml | 12 ++++++++++++ .../application-swing-validation_en_GB.properties | 1 + .../application-swing-validation_es_ES.properties | 1 + .../application-swing-validation_fr_FR.properties | 1 + .../content/table/impl/seine/AbstractSampleUI.jcss | 21 ++++++++++++++++++--- .../table/impl/seine/NonTargetSampleUI.jcss | 10 ---------- .../content/table/impl/seine/TargetSampleUI.jaxx | 11 +++++++++++ .../table/impl/seine/TargetSampleUIHandler.java | 8 ++++++-- .../table/impl/seine/TargetSampleUIModel.java | 2 ++ .../i18n/application-swing_en_GB.properties | 2 ++ .../i18n/application-swing_es_ES.properties | 2 ++ .../i18n/application-swing_fr_FR.properties | 2 ++ .../DataSourceMigrationForVersion_5_1.java | 1 + .../V5_1_09_evol_7877_targetLength_add_sex-H2.sql | 2 ++ .../V5_1_09_evol_7877_targetLength_add_sex-PG.sql | 2 ++ entities/src/main/xmi/observe-seine.zargo | Bin 85633 -> 85870 bytes .../request/ReferenceSetRequestDefinitions.java | 1 + .../src/main/xmi/observe-services-dto-seine.zargo | Bin 59655 -> 59857 bytes services-dto/src/main/xmi/observe-services-dto.ini | 1 + .../TargetLength-service-error-validation.xml | 12 ++++++++++++ .../services-topia-validation_en_GB.properties | 1 + .../services-topia-validation_es_ES.properties | 1 + .../services-topia-validation_fr_FR.properties | 1 + .../topia/binder/data/TargetLengthBinder.java | 4 ++++ 24 files changed, 84 insertions(+), 15 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm