This is an automated email from the git hooks/post-receive script. New commit to branch feature/7626 in repository tutti. See http://git.codelutin.com/tutti.git commit c75ad737dc2f086ec8d2179a65dbbe78ac955374 Author: Kevin Morin <morin@codelutin.com> Date: Mon Dec 14 17:23:12 2015 +0100 L'espèce sélectionnée dans la popup n'est pas sélectionnée dans la liste déroulante. Je n'arrive pas à reproduire l'erreur, mais je suppose que ca vient du fait qu'on n'est pas dans le thread swing quand on modifie le modèle. (refs #7626) --- .../actions/SelectSpeciesForBenthosBatchAction.java | 19 +++++++++++++++++-- .../actions/SelectSpeciesForSpeciesBatchAction.java | 18 ++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/create/actions/SelectSpeciesForBenthosBatchAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/create/actions/SelectSpeciesForBenthosBatchAction.java index 013c8c1..634bef5 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/create/actions/SelectSpeciesForBenthosBatchAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/create/actions/SelectSpeciesForBenthosBatchAction.java @@ -49,6 +49,7 @@ public class SelectSpeciesForBenthosBatchAction extends LongActionSupport<Create protected List<Species> referentSpecies; protected Species selectedSpecies; + private List<Species> availableSpecies; public SelectSpeciesForBenthosBatchAction(CreateBenthosBatchUIHandler handler) { super(handler, false); @@ -78,7 +79,7 @@ public class SelectSpeciesForBenthosBatchAction extends LongActionSupport<Create CreateBenthosBatchUIModel model = getModel(); - List<Species> availableSpecies = Lists.newArrayList(model.getAvailableSpecies()); + availableSpecies = Lists.newArrayList(model.getAvailableSpecies()); if (!selectedSpecies.isReferenceTaxon()) { String decoratedSynonym = decorate(selectedSpecies, DecoratorService.FROM_PROTOCOL); @@ -93,9 +94,23 @@ public class SelectSpeciesForBenthosBatchAction extends LongActionSupport<Create if (!availableSpecies.contains(selectedSpecies)) { availableSpecies.add(selectedSpecies); } + + } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + CreateBenthosBatchUIModel model = getModel(); model.setAvailableSpecies(availableSpecies); model.setSpecies(selectedSpecies); - } + @Override + protected void releaseAction() { + super.releaseAction(); + + availableSpecies = null; + selectedSpecies = null; + } } diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/create/actions/SelectSpeciesForSpeciesBatchAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/create/actions/SelectSpeciesForSpeciesBatchAction.java index 387af61..29869f9 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/create/actions/SelectSpeciesForSpeciesBatchAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/create/actions/SelectSpeciesForSpeciesBatchAction.java @@ -49,6 +49,7 @@ public class SelectSpeciesForSpeciesBatchAction extends LongActionSupport<Create protected List<Species> referentSpecies; protected Species selectedSpecies; + private List<Species> availableSpecies; public SelectSpeciesForSpeciesBatchAction(CreateSpeciesBatchUIHandler handler) { super(handler, false); @@ -78,7 +79,7 @@ public class SelectSpeciesForSpeciesBatchAction extends LongActionSupport<Create CreateSpeciesBatchUIModel model = getModel(); - List<Species> availableSpecies = Lists.newArrayList(model.getAvailableSpecies()); + availableSpecies = Lists.newArrayList(model.getAvailableSpecies()); if (!selectedSpecies.isReferenceTaxon()) { String decoratedSynonym = decorate(selectedSpecies, DecoratorService.FROM_PROTOCOL); @@ -93,9 +94,22 @@ public class SelectSpeciesForSpeciesBatchAction extends LongActionSupport<Create if (!availableSpecies.contains(selectedSpecies)) { availableSpecies.add(selectedSpecies); } + + } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + CreateSpeciesBatchUIModel model = getModel(); model.setAvailableSpecies(availableSpecies); model.setSpecies(selectedSpecies); - } + @Override + protected void releaseAction() { + super.releaseAction(); + availableSpecies = null; + selectedSpecies = null; + } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.