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
1 changed file:
Changes:
| ... | ... | @@ -124,6 +124,16 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa |
| 124 | 124 |
NonTargetCatchDto source = (NonTargetCatchDto) evt.getSource();
|
| 125 | 125 |
source.setMeanLengthComputedSource(null);
|
| 126 | 126 |
};
|
| 127 |
+ addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
|
|
| 128 |
+ |
|
| 129 |
+ String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId();
|
|
| 130 |
+ String tripId = getDataContext().getSelectedTripSeineId();
|
|
| 131 |
+ |
|
| 132 |
+ List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
|
|
| 133 |
+ |
|
| 134 |
+ return DtoReferenceCollection.filterEnabled(result);
|
|
| 135 |
+ |
|
| 136 |
+ });
|
|
| 127 | 137 |
}
|
| 128 | 138 |
|
| 129 | 139 |
String getCatchWeightDataTip(NonTargetCatchComputedValueSource computed) {
|
| ... | ... | @@ -375,16 +385,6 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetSeineNonTa |
| 375 | 385 |
loadReferentialReferenceSetsInModel(form);
|
| 376 | 386 |
getModel().setForm(form);
|
| 377 | 387 |
SetSeineNonTargetCatchHelper.copySetSeineNonTargetCatchDto(form.getObject(), getBean());
|
| 378 |
- addReferentialFilter(NonTargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> {
|
|
| 379 |
- |
|
| 380 |
- String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineNonTargetCatchId();
|
|
| 381 |
- String tripId = getDataContext().getSelectedTripSeineId();
|
|
| 382 |
- |
|
| 383 |
- List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripId, speciesListId).toList();
|
|
| 384 |
- |
|
| 385 |
- return DtoReferenceCollection.filterEnabled(result);
|
|
| 386 |
- |
|
| 387 |
- });
|
|
| 388 | 388 |
}
|
| 389 | 389 |
|
| 390 | 390 |
boolean showReasonForDiscard(SpeciesFateReference speciesFate) {
|