Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: cd0ea9b3 by Tony Chemit at 2021-02-09T09:59:46+01:00 Problème de sauvegardes des échantillons - Closes #1780 - - - - - 2ee01f5d by Tony Chemit at 2021-02-09T13:06:54+01:00 Mauvaise disposition de l'encadré des espèces et quelques améliorations sur les deux écrans - See #1781 - - - - - 3af924ab by Tony Chemit at 2021-02-09T13:13:50+01:00 On en voit plus les DCP! - See #1782 - - - - - 9 changed files: - client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/sample/CommonSample.jcss - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/DiscardedTargetSampleUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/DiscardedTargetSampleUIHandler.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/KeptTargetSampleUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/KeptTargetSampleUIHandler.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/NonTargetSampleUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/NonTargetSampleUIHandler.java - pom.xml - services/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/SampleDataServiceLocalSupport.java Changes: ===================================== client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/sample/CommonSample.jcss ===================================== @@ -25,7 +25,7 @@ } #acquisitionModePanel { - border:{new TitledBorder(t("observe.data.Data.acquisitionMode"))}; + border:{new TitledBorder(new javax.swing.border.EmptyBorder(0,0,0,0), t("observe.data.Data.acquisitionMode"))}; } #acquisitionModeNumber { @@ -45,7 +45,7 @@ } #speciesAndMeasureTypesPanel { - border:{new TitledBorder(t("observe.data.Data.speciesAndMeasureTypes"))}; + border:{new TitledBorder(new javax.swing.border.EmptyBorder(0,0,0,0), t("observe.data.Data.speciesAndMeasureTypes"))}; } #sizeMeasureType { ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/DiscardedTargetSampleUI.jaxx ===================================== @@ -70,42 +70,42 @@ <Table id='editorPanel' fill='both' insets='1' beanScope="tableEditBean" _tableEditors='{newComponentArray(species,sex,sizeMeasureType,length,weight,count)}'> - <!-- mode de saisie --> + <!-- mode de saisie - espèce - type de mesures --> <row> - <cell columns="3"> - <JPanel id="modeAndCodePanel" layout='{new BorderLayout()}'> - <JPanel id='acquisitionModePanel' constraints="BorderLayout.CENTER" layout="{new GridLayout(0, 1)}"> - <JRadioButton id='acquisitionModeNumber'/> - <JRadioButton id='acquisitionModeIndividual'/> - </JPanel> - <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1' constraints="BorderLayout.EAST"> - <row> - <cell> - <JLabel id='speciesLabel' styleClass="i18n"/> - </cell> - <cell weightx="1"> - <JaxxComboBox id='species' genericType='SpeciesReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> - </cell> - </row> - </Table> + <cell> + <JPanel id='acquisitionModePanel' layout="{new GridLayout(0, 1)}"> + <JRadioButton id='acquisitionModeNumber'/> + <JRadioButton id='acquisitionModeIndividual'/> </JPanel> </cell> + <cell weightx='1' anchor='east'> + <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1'> + <row> + <cell> + <JLabel id='speciesLabel' styleClass="i18n"/> + </cell> + <cell weightx="1"> + <JaxxComboBox id='species' genericType='SpeciesReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> + </cell> + </row> + </Table> + </cell> </row> <!-- sex --> @@ -126,18 +126,13 @@ <cell weightx='1' anchor='east'> <NumberEditor id='length' styleClass="float1"/> </cell> - <cell anchor='east'> - <JToolBar id='lengthSourceAction'> - <JButton id='lengthSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsLengthComputed()'/> - </JToolBar> - </cell> </row> <!-- lengthMeasureMethod --> <row> <cell> <JLabel id='lengthMeasureMethodLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='lengthMeasureMethod' genericType='LengthMeasureMethodReference'/> </cell> </row> @@ -150,18 +145,13 @@ <cell weightx='1' anchor='east'> <NumberEditor id='weight' styleClass="float2"/> </cell> - <cell anchor='east'> - <JToolBar id='weightSourceAction'> - <JButton id='weightSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsWeightComputed()'/> - </JToolBar> - </cell> </row> <!-- weightMeasureMethod --> <row> <cell> <JLabel id='weightMeasureMethodLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/> </cell> </row> @@ -198,5 +188,7 @@ <JPanel id="invisible"> <JButton id="defaultSizeMeasureType"/> <JButton id="defaultWeightMeasureType"/> + <JButton id='lengthSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsLengthComputed()'/> + <JButton id='weightSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsWeightComputed()'/> </JPanel> </fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUI> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/DiscardedTargetSampleUIHandler.java ===================================== @@ -87,6 +87,8 @@ public class DiscardedTargetSampleUIHandler extends GeneratedDiscardedTargetSamp ui.getAcquisitionModeGroup().addChangeListener(this::onAcquisitionModeChanged); ui.getSizeMeasureType().getToolbarRight().add(ui.getDefaultSizeMeasureType()); ui.getWeightMeasureType().getToolbarRight().add(ui.getDefaultWeightMeasureType()); + ui.getLength().getRightToolbar().add(ui.getLengthSourceInformation()); + ui.getWeight().getRightToolbar().add(ui.getWeightSourceInformation()); ResetSizeMeasureType.install(ui, ui.getDefaultSizeMeasureType(), ui.getSizeMeasureType()); ResetWeightMeasureType.install(ui, ui.getDefaultWeightMeasureType(), ui.getWeightMeasureType()); } ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/KeptTargetSampleUI.jaxx ===================================== @@ -69,42 +69,42 @@ <Table id='editorPanel' fill='both' insets='1' beanScope="tableEditBean" _tableEditors='{newComponentArray(species,sex,sizeMeasureType,length,weight,count)}'> - <!-- mode de saisie --> + <!-- mode de saisie - espèce - type de mesures --> <row> - <cell columns="3"> - <JPanel id="modeAndCodePanel" layout='{new BorderLayout()}'> - <JPanel id='acquisitionModePanel' constraints="BorderLayout.CENTER" layout="{new GridLayout(0, 1)}"> - <JRadioButton id='acquisitionModeNumber'/> - <JRadioButton id='acquisitionModeIndividual'/> - </JPanel> - <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1' constraints="BorderLayout.EAST"> - <row> - <cell> - <JLabel id='speciesLabel' styleClass="i18n"/> - </cell> - <cell weightx="1"> - <JaxxComboBox id='species' genericType='SpeciesReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> - </cell> - </row> - </Table> + <cell> + <JPanel id='acquisitionModePanel' layout="{new GridLayout(0, 1)}"> + <JRadioButton id='acquisitionModeNumber'/> + <JRadioButton id='acquisitionModeIndividual'/> </JPanel> </cell> + <cell weightx='1' anchor='east'> + <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1'> + <row> + <cell> + <JLabel id='speciesLabel' styleClass="i18n"/> + </cell> + <cell weightx="1"> + <JaxxComboBox id='species' genericType='SpeciesReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> + </cell> + </row> + </Table> + </cell> </row> <!-- sex --> @@ -125,18 +125,13 @@ <cell weightx='1' anchor='east'> <NumberEditor id='length' styleClass="float1"/> </cell> - <cell anchor='east'> - <JToolBar id='lengthSourceAction'> - <JButton id='lengthSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsLengthComputed()'/> - </JToolBar> - </cell> </row> <!-- lengthMeasureMethod --> <row> <cell> <JLabel id='lengthMeasureMethodLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='lengthMeasureMethod' genericType='LengthMeasureMethodReference'/> </cell> </row> @@ -149,18 +144,13 @@ <cell weightx='1' anchor='east'> <NumberEditor id='weight' styleClass="float2"/> </cell> - <cell anchor='east'> - <JToolBar id='weightSourceAction'> - <JButton id='weightSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsWeightComputed()'/> - </JToolBar> - </cell> </row> <!-- weightMeasureMethod --> <row> <cell> <JLabel id='weightMeasureMethodLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/> </cell> </row> @@ -197,5 +187,7 @@ <JPanel id="invisible"> <JButton id="defaultSizeMeasureType"/> <JButton id="defaultWeightMeasureType"/> + <JButton id='lengthSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsLengthComputed()'/> + <JButton id='weightSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsWeightComputed()'/> </JPanel> </fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUI> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/KeptTargetSampleUIHandler.java ===================================== @@ -87,6 +87,8 @@ public class KeptTargetSampleUIHandler extends GeneratedKeptTargetSampleUIHandle ui.getAcquisitionModeGroup().addChangeListener(this::onAcquisitionModeChanged); ui.getSizeMeasureType().getToolbarRight().add(ui.getDefaultSizeMeasureType()); ui.getWeightMeasureType().getToolbarRight().add(ui.getDefaultWeightMeasureType()); + ui.getLength().getRightToolbar().add(ui.getLengthSourceInformation()); + ui.getWeight().getRightToolbar().add(ui.getWeightSourceInformation()); ResetSizeMeasureType.install(ui, ui.getDefaultSizeMeasureType(), ui.getSizeMeasureType()); ResetWeightMeasureType.install(ui, ui.getDefaultWeightMeasureType(), ui.getWeightMeasureType()); } ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/NonTargetSampleUI.jaxx ===================================== @@ -71,42 +71,42 @@ <Table id='editorPanel' fill='both' insets='1' beanScope="tableEditBean" _tableEditors='{newComponentArray(species,sizeMeasureType,length,weight,count,sex,speciesFate,picturesReferences)}'> - <!-- mode de saisie --> + <!-- mode de saisie - espèce - type de mesures --> <row> - <cell columns="3"> - <JPanel id="modeAndCodePanel" layout='{new BorderLayout()}'> - <JPanel id='acquisitionModePanel' constraints="BorderLayout.CENTER" layout="{new GridLayout(0, 1)}"> - <JRadioButton id='acquisitionModeNumber'/> - <JRadioButton id='acquisitionModeIndividual'/> - </JPanel> - <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1' constraints="BorderLayout.EAST"> - <row> - <cell> - <JLabel id='speciesLabel' styleClass="i18n"/> - </cell> - <cell weightx='1'> - <JaxxComboBox id='species' genericType='SpeciesReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> - </cell> - <cell> - <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> - </cell> - </row> - </Table> + <cell> + <JPanel id='acquisitionModePanel' layout="{new GridLayout(0, 1)}"> + <JRadioButton id='acquisitionModeNumber'/> + <JRadioButton id='acquisitionModeIndividual'/> </JPanel> </cell> + <cell weightx='1' anchor='east'> + <Table id='speciesAndMeasureTypesPanel' fill='both' insets='1'> + <row> + <cell> + <JLabel id='speciesLabel' styleClass="i18n"/> + </cell> + <cell weightx="1"> + <JaxxComboBox id='species' genericType='SpeciesReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='sizeMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='sizeMeasureType' genericType='SizeMeasureTypeReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='weightMeasureTypeLabel' styleClass="i18n"/> + </cell> + <cell> + <JaxxComboBox id='weightMeasureType' genericType='WeightMeasureTypeReference'/> + </cell> + </row> + </Table> + </cell> </row> <!-- length --> @@ -117,12 +117,6 @@ <cell weightx='1' anchor='east'> <NumberEditor id='length' styleClass="float1"/> </cell> - <cell anchor='east'> - <JToolBar id='lengthSourceAction'> - <JButton id='lengthSourceInformation' styleClass='computedDataInformation' - onActionPerformed='handler.resetIsLengthComputed()'/> - </JToolBar> - </cell> </row> <!-- weight --> @@ -133,19 +127,13 @@ <cell weightx='1' anchor='east'> <NumberEditor id='weight' styleClass="float2"/> </cell> - <cell anchor='east'> - <JToolBar id='weightSourceAction'> - <JButton id='weightSourceInformation' styleClass='computedDataInformation' - onActionPerformed='handler.resetIsWeightComputed()'/> - </JToolBar> - </cell> </row> <!-- weightMeasureMethod --> <row> <cell> <JLabel id='weightMeasureMethodLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/> </cell> </row> @@ -175,7 +163,7 @@ <cell> <JLabel id='speciesFateLabel'/> </cell> - <cell weightx='1' anchor='east' columns="2"> + <cell weightx='1' anchor='east'> <JaxxComboBox id='speciesFate' genericType='SpeciesFateReference'/> </cell> </row> @@ -212,5 +200,7 @@ <JPanel id="invisible"> <JButton id="defaultSizeMeasureType"/> <JButton id="defaultWeightMeasureType"/> + <JButton id='lengthSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsLengthComputed()'/> + <JButton id='weightSourceInformation' styleClass='computedDataInformation' onActionPerformed='handler.resetIsWeightComputed()'/> </JPanel> </fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUI> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/NonTargetSampleUIHandler.java ===================================== @@ -85,6 +85,8 @@ public class NonTargetSampleUIHandler extends GeneratedNonTargetSampleUIHandler ui.getAcquisitionModeGroup().addChangeListener(this::onAcquisitionModeChanged); ui.getSizeMeasureType().getToolbarRight().add(ui.getDefaultSizeMeasureType()); ui.getWeightMeasureType().getToolbarRight().add(ui.getDefaultWeightMeasureType()); + ui.getLength().getRightToolbar().add(ui.getLengthSourceInformation()); + ui.getWeight().getRightToolbar().add(ui.getWeightSourceInformation()); ResetSizeMeasureType.install(ui, ui.getDefaultSizeMeasureType(), ui.getSizeMeasureType()); ResetWeightMeasureType.install(ui, ui.getDefaultWeightMeasureType(), ui.getWeightMeasureType()); } ===================================== pom.xml ===================================== @@ -147,7 +147,7 @@ <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> <buildDate>${maven.build.timestamp}</buildDate> - <toolkit.version>5.0.1</toolkit.version> + <toolkit.version>5.0.2-SNAPSHOT</toolkit.version> <lib.version.ognl>3.1.28</lib.version.ognl> <!--can't use 1.4.197 (date has changed + blob also)--> ===================================== services/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/SampleDataServiceLocalSupport.java ===================================== @@ -61,13 +61,14 @@ public abstract class SampleDataServiceLocalSupport<C extends ContainerChildDto, @Override public SaveResultDto save(M dto) { - boolean notPersisted = dto.isNotPersisted(); // this is a trick we always use id as parent id... Set parent = loadParentEntity(dto.getId()); E entity = loadFormEntity(parent); checkLastUpdateDate(entity, dto); - // use the real id + // use the real sample id dto.setId(entity.getTopiaId()); + // not persisted is to be on sample (not set) + boolean notPersisted = dto.isNotPersisted(); entity.fromDto(getReferentialLocale(), dto); return onSave(parent, entity, notPersisted); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/49eaddefb1c4fa56d32b591ef... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/49eaddefb1c4fa56d32b591ef... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT