From: Patrick Plitzner Date: Wed, 17 Oct 2018 09:37:31 +0000 (+0200) Subject: ref #6554 Fix initial expansion state X-Git-Tag: 5.4.0^2~93 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/15aa0a1cb08d493a129104d6e264511d48ba8bd2 ref #6554 Fix initial expansion state --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java index 7381ae86c..66d0f4e07 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java @@ -57,6 +57,11 @@ public class CdmSectionPart extends SectionPart implements private final AbstractFormSection formSection; + /** + * Initial input + */ + private Object rootInput; + /** *

* Constructor for CdmSectionPart. @@ -76,6 +81,7 @@ public class CdmSectionPart extends SectionPart implements /** {@inheritDoc} */ @Override public boolean setFormInput(Object input) { + this.rootInput = input; //FIXME (CM): Need to fix this part of the design. //The design seems to be locked to the idea that only one // entity (either from the navigator or the editor) drives @@ -193,7 +199,7 @@ public class CdmSectionPart extends SectionPart implements @Override protected void expansionStateChanged(boolean expanded) { super.expansionStateChanged(expanded); - PreferencesUtil.getPreferenceStore().setValue(StoreUtil.getPrefKey(formSection.getClass(), formSection.getEntity()), expanded); + PreferencesUtil.getPreferenceStore().setValue(StoreUtil.getPrefKey(formSection.getClass(), rootInput), expanded); } }