Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: a66d04a1 by Tony CHEMIT at 2018-07-10T07:23:09Z Fix some bugs... - - - - - 6 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineSampleLogbookListUIHandler.java - persistence/src/main/resources/db/migration/8.0/08_add_weight_category-common.sql Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java ===================================== @@ -35,6 +35,8 @@ import fr.ird.observe.client.ui.content.data.longline.logbook.FloatlinesComposit import fr.ird.observe.client.ui.content.data.longline.logbook.HooksCompositionLogbookUI; import fr.ird.observe.client.ui.content.data.longline.logbook.LonglineGlobalCompositionLogbookUI; import fr.ird.observe.client.ui.content.data.longline.logbook.SetLonglineLogbookUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.TripLonglineLandingLogbookListUI; +import fr.ird.observe.client.ui.content.data.longline.logbook.TripLonglineSampleLogbookListUI; import fr.ird.observe.client.ui.content.data.longline.obs.ActivityLonglineObsListUI; import fr.ird.observe.client.ui.content.data.longline.obs.ActivityLonglineObsUI; import fr.ird.observe.client.ui.content.data.longline.obs.BaitsCompositionObsUI; @@ -559,6 +561,9 @@ public class ObserveFocusManager { builder.put(ActivityLonglineObsListUI.class, new ContentListUIObserveLayoutFocusTraversalPolicy()); builder.put(ActivityLonglineLogbookListUI.class, new ContentListUIObserveLayoutFocusTraversalPolicy()); + builder.put(TripLonglineLandingLogbookListUI.class, new ContentListUIObserveLayoutFocusTraversalPolicy()); + builder.put(TripLonglineSampleLogbookListUI.class, new ContentListUIObserveLayoutFocusTraversalPolicy()); + builder.put(TripLonglineUI.class, new ObserveLayoutFocusTraversalPolicy<TripLonglineUI>() { @Override ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jaxx ===================================== @@ -36,6 +36,7 @@ fr.ird.observe.dto.data.longline.SetLonglineLogbookCatchDto fr.ird.observe.dto.referential.SpeciesReference fr.ird.observe.dto.referential.SexReference + fr.ird.observe.dto.referential.WeightMeasureMethodReference fr.ird.observe.dto.referential.longline.BaitHaulingStatusReference fr.ird.observe.dto.referential.longline.CatchFateLonglineReference fr.ird.observe.dto.referential.longline.HealthnessReference @@ -156,10 +157,10 @@ <NumberEditor id='totalWeight' constructorParams='this' styleClass="float3"/> </cell> <cell> - <JLabel id='weightDeterminationMethodLabel'/> + <JLabel id='weightMeasureMethodLabel'/> </cell> <cell weightx='1' anchor='east'> - <BeanComboBox id='weightDeterminationMethod' constructorParams='this' genericType='HealthnessReference'/> + <BeanComboBox id='weightMeasureMethod' constructorParams='this' genericType='WeightMeasureMethodReference'/> </cell> </row> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUI.jcss ===================================== @@ -76,6 +76,10 @@ selectedItem:{tableEditBean.getSpeciesCatch()}; } +#weightMeasureMethod { + selectedItem:{tableEditBean.getWeightMeasureMethod()}; +} + #onBoardProcessing { selectedItem:{tableEditBean.getOnBoardProcessing()}; } ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/CatchLonglineLogbookUIHandler.java ===================================== @@ -96,14 +96,14 @@ public class CatchLonglineLogbookUIHandler extends ContentTableUIHandler<SetLong addReferentialFilter(CatchLonglineLogbookDto.PROPERTY_SPECIES_CATCH, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineCatchId(); - String tripLonglineId = getSelectedId(); + String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId(); List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList(); return DtoReferenceCollection.filterEnabled(result); }); addReferentialFilter(CatchLonglineLogbookDto.PROPERTY_PREDATOR, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListLonglineDepredatorId(); - String tripLonglineId = getSelectedId(); + String tripLonglineId = ObserveSwingApplicationContext.get().getNavigationSelect().getLongline().getTrip().getId(); List<SpeciesReference> result = getTripLonglineService().getSpeciesByListAndTrip(tripLonglineId, speciesListId).toList(); return DtoReferenceCollection.filterEnabled(result); }); @@ -211,7 +211,7 @@ public class CatchLonglineLogbookUIHandler extends ContentTableUIHandler<SetLong boolean isGrouped = CatchAcquisitionMode.GROUPED.equals(newMode); ui.getTotalWeight().setEnabled(isGrouped); - ui.getWeightDeterminationMethod().setEnabled(isGrouped); + ui.getWeightMeasureMethod().setEnabled(isGrouped); ui.getCount().setEnabled(isGrouped); if (createMode) { ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/TripLonglineSampleLogbookListUIHandler.java ===================================== @@ -83,7 +83,7 @@ public class TripLonglineSampleLogbookListUIHandler extends ContentListUIHandler @Override protected ContentMode getContentMode() { - String selectedId = getSelectedId(); + String selectedId = getSelectedParentId(); if (!selectedId.equals(getEditNode().getId())) { addInfoMessage(n("observe.common.TripLonglineDto.message.no.active.found")); return ContentMode.READ; ===================================== persistence/src/main/resources/db/migration/8.0/08_add_weight_category-common.sql ===================================== @@ -21,4 +21,4 @@ --- CREATE TABLE observe_longline.WeightCategory(topiaid VARCHAR(255) NOT NULL,topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needComment BOOLEAN DEFAULT false, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255),label4 VARCHAR(255),label5 VARCHAR(255),label6 VARCHAR(255),label7 VARCHAR(255),label8 VARCHAR(255)); ALTER TABLE observe_longline.WeightCategory ADD CONSTRAINT PK_WeightCategory PRIMARY KEY(topiaid); -INSERT INTO observe_common.LASTUPDATEDATE(topiaId, topiaversion, topiacreatedate, TYPE , LASTUPDATEDATE) values ('fr.ird.observe.entities.LastUpdateDate#666#1005', 0,CURRENT_DATE, 'fr.ird.observe.entities.referentiel.longline.WeightCategory', CURRENT_TIMESTAMP); +INSERT INTO observe_common.LASTUPDATEDATE(topiaId, topiaversion, topiacreatedate, TYPE , LASTUPDATEDATE) values ('fr.ird.observe.entities.LastUpdateDate#666#1005', 0,CURRENT_DATE, 'fr.ird.observe.entities.referentiel.longline.WeightCategoryLongline', CURRENT_TIMESTAMP); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a66d04a181aaf3d4f08db7cf941d... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a66d04a181aaf3d4f08db7cf941d... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT