diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DisposableSectionPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DisposableSectionPanel.java index b7983d86357d7118a9f3992f193ce726d2364aa3..5bd25cb71736281ed2867cf51641ff576ecd0d67 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DisposableSectionPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DisposableSectionPanel.java @@ -46,7 +46,7 @@ abstract public class DisposableSectionPanel extends SingleSectionPanel } @Override - protected void disposeComponents() + public void disposeComponents() { if (disposableComponentOrNull != null) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SingleSectionPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SingleSectionPanel.java index 7f720857ebe8791f24ea189be511e1b609dedd41..2ee93dbd7da249e9651f42c09d7b2b91c8f30639 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SingleSectionPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SingleSectionPanel.java @@ -42,9 +42,10 @@ abstract public class SingleSectionPanel extends ContentPanel private boolean isContentVisible = false; /** - * whether additional components created for this section (e.g. browsers) should be automatically - * disposed (for sections that can temporarily removed from container as in - * {@link SectionsPanel} it should be turned off until detach from the container) + * Whether additional components created for this section (e.g. browsers) should be + * automatically disposed when the section is detached from its container. For sections that can + * temporarily removed from container as in {@link SectionsPanel} it should be turned off and + * the container should dispose section components manually. */ private boolean autoDisposeComponents = true; @@ -95,14 +96,9 @@ abstract public class SingleSectionPanel extends ContentPanel return isContentVisible; } - public void enableAutoDisposeComponents() - { - setAutoDisposeComponents(true); - } - public void disableAutoDisposeComponents() { - setAutoDisposeComponents(false); + this.autoDisposeComponents = false; } protected boolean isAutoDisposeComponents() @@ -110,11 +106,6 @@ abstract public class SingleSectionPanel extends ContentPanel return autoDisposeComponents; } - private void setAutoDisposeComponents(boolean autoDisposeComponent) - { - this.autoDisposeComponents = autoDisposeComponent; - } - @Override protected void onDetach() { @@ -126,7 +117,7 @@ abstract public class SingleSectionPanel extends ContentPanel } /** disposes components created for the section (by default does nothing) */ - protected void disposeComponents() + public void disposeComponents() { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java index 27ecfe1334be310b5a97ec7888c9a4004db616b2..df61c4e288a8417444b09df28ef83d789328fdf1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java @@ -540,7 +540,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod public void dispose() { - debug("dispose a tab"); + debug("dispose a browser"); self.disposeCache(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java index a1b955aa17c4675ee2af4c4a32784086b7fd96c3..db2de02c10e09d234d7997d2f4cbd2e3fe56c892 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java @@ -158,7 +158,7 @@ public class SectionsPanel extends ContentPanel { for (SectionElement el : elements) { - el.getPanel().enableAutoDisposeComponents(); + el.getPanel().disposeComponents(); } super.onDetach(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java index 8f26cb4d6e7f3da4ddda2e1d5ed815cfaddd1b74..e79c6948f294f62485747ada1d763bc5f15a18d0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java @@ -73,7 +73,7 @@ public class DataViewSection extends SingleSectionPanel } @Override - protected void disposeComponents() + public void disposeComponents() { disposeCurrentReport(); }