Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: da612dee by Tony Chemit at 2020-07-01T13:42:27+02:00 [7.6.3][PS] Les thonidés sont disponibles dans la liste déroulante du form Espèces accessoires, alors qu'ils ne sont pas dans la display liste correspondante - Closes #1562 - - - - - 1 changed file: - client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUIHandler.java Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUIHandler.java ===================================== @@ -124,6 +124,16 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa NonTargetCatchDto source = (NonTargetCatchDto) evt.getSource(); source.setMeanLengthComputedSource(null); }; + addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { + + String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId(); + String tripId = getDataContext().getSelectedTripSeineId(); + + List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList(); + + return DtoReferenceCollection.filterEnabled(result); + + }); } String getCatchWeightDataTip(NonTargetCatchComputedValueSource computed) { @@ -375,16 +385,6 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa loadReferentialReferenceSetsInModel(form); getModel().setForm(form); SetSeineNonTargetCatchHelper.copySetSeineNonTargetCatchDto(form.getObject(), getBean()); - addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { - - String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId(); - String tripId = getDataContext().getSelectedTripSeineId(); - - List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList(); - - return DtoReferenceCollection.filterEnabled(result); - - }); } boolean showReasonForDiscard(SpeciesFateReference speciesFate) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/da612dee9f3b1e1c60939c7dbd... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/da612dee9f3b1e1c60939c7dbd... You're receiving this email because of your account on gitlab.com.