From 04d1eb429247e4801e1cacf692613d260121aa89 Mon Sep 17 00:00:00 2001 From: ribeaudc <ribeaudc> Date: Mon, 24 Nov 2008 14:35:00 +0000 Subject: [PATCH] [LMS-658] add: - Create a dummy starting menu in 'ColumnChooser'. SVN: 9083 --- .../ui/sample_browser/ColumnChooser.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ColumnChooser.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ColumnChooser.java index c8ddc84c0ec..abc4ac9bfec 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ColumnChooser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample_browser/ColumnChooser.java @@ -64,7 +64,17 @@ final class ColumnChooser extends TextToolItem this.parentColumns = parentColumns; this.propertyColumns = propertyColumns; setEnabled(false); - reload(); + // Setting a menu, even dummy, at construction seems to be important for correct GUI + // rendering, especially for Safari. + setMenu(createDummyMenu()); + } + + private final static Menu createDummyMenu() + { + final Menu menu = new Menu(); + // Putting nothing or just an empty string does not satisfy Safari. + menu.add(new MenuItem("<dummy>")); + return menu; } final void reload() @@ -84,9 +94,9 @@ final class ColumnChooser extends TextToolItem private final List<Item> createCommonMenu() { final ArrayList<Item> result = new ArrayList<Item>(); - for (final ColumnConfig cc : commonColumns.getColumns()) + for (final ColumnConfig columnConfig : commonColumns.getColumns()) { - result.add(createFromConfig(cc)); + result.add(createFromConfig(columnConfig)); } return result; } -- GitLab