From: Andreas Müller Date: Tue, 14 Jan 2014 22:18:53 +0000 (+0000) Subject: fix missing publish flag for synonyms X-Git-Tag: 3.6.0~845 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/f1b1b1e7e9563baeb9c9d09cebd6dc09098c4dec fix missing publish flag for synonyms --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java index 525d3ba3f..f3f9155f0 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java @@ -97,9 +97,10 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem checkbox_doubtful = formFactory.createCheckbox(formElement, entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style); - checkbox_published = formFactory.createCheckbox(formElement, - "Taxon is published", ((TaxonBase) entity).isPublish(), style); - + if (entity instanceof Taxon) { + checkbox_published = formFactory.createCheckbox(formElement, + "Taxon is published", ((Taxon) entity).isPublish(), style); + } } /** {@inheritDoc} */ @@ -136,7 +137,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem } else if (eventSource == checkbox_unplaced) { ((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection()); } else if (eventSource == checkbox_published) { - ((Taxon) getEntity()).setPublish(checkbox_published.getSelection()); + ((Taxon)getEntity()).setPublish(checkbox_published.getSelection()); } } }