diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java index 086cd9d10418faab5ea1fc8fbff85119073a26d5..e96180c28057bc5709abf56a66a9dd209149aa88 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java @@ -38,6 +38,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework. import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.LoginController; import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.AttachmentDownloadLocatorResolver; import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.BrowserLocatorResolver; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.GlobalSearchLocatorResolver; import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.HomeLocatorResolver; import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.MaterialLocatorResolver; import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.OpenViewAction; @@ -341,6 +342,7 @@ public class Client implements EntryPoint, ValueChangeHandler<String> handlerRegistry.registerHandler(new SearchLocatorResolver(context)); handlerRegistry.registerHandler(new BrowserLocatorResolver(context)); + handlerRegistry.registerHandler(new GlobalSearchLocatorResolver(context)); handlerRegistry.registerHandler(new HomeLocatorResolver(context)); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..34174e359d9f988c91c3a01e8f64dc0a5b2ae996 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java @@ -0,0 +1,127 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.client.web.client.application; + +import com.extjs.gxt.ui.client.widget.MessageBox; + +import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.AbstractTabItemFactory; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DefaultTabItem; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.ITabItem; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier.HelpPageAction; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier.HelpPageDomain; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.IDataRefreshCallback; +import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SearchableEntity; + +/** + * @author Kaloyan Enimanev + */ +public class GlobalSearchTabItemFactory +{ + + public static AbstractTabItemFactory create( + final IViewContext<ICommonClientServiceAsync> viewContext, + final SearchableEntity searchableEntity, final String queryText) + { + + final boolean useWildcardSearchMode = + viewContext.getDisplaySettingsManager().isUseWildcardSearchMode(); + + final MatchingEntitiesPanel matchingEntitiesGrid = + new MatchingEntitiesPanel(viewContext, searchableEntity, queryText, + useWildcardSearchMode); + + String entityDescription = (searchableEntity != null) ? searchableEntity.getDescription() : null; + String title = createTabTitle(viewContext, entityDescription, queryText); + + final AbstractTabItemFactory tabFactory = + createTabFactory(matchingEntitiesGrid, title, viewContext); + + matchingEntitiesGrid.refresh(new IDataRefreshCallback() + { + public void postRefresh(boolean wasSuccessful) + { + if (wasSuccessful == false) + { + return; + } + if (matchingEntitiesGrid.getRowNumber() == 0) + { + Object[] msgParameters = (useWildcardSearchMode == true) ? new String[] + { queryText, "", "off", } : new String[] + { queryText, "not", "on" }; + MessageBox.alert(viewContext.getMessage(Dict.MESSAGEBOX_WARNING), + viewContext.getMessage(Dict.NO_MATCH, msgParameters), null); + return; + } + } + }); + + return tabFactory; + + } + + private static String createTabTitle(IViewContext<ICommonClientServiceAsync> viewContext, + String chosenEntity, String queryText) + { + return viewContext.getMessage(Dict.GLOBAL_SEARCH, chosenEntity, queryText); + } + + private static AbstractTabItemFactory createTabFactory( + final MatchingEntitiesPanel matchingEntitiesPanel, final String title, + IViewContext<?> viewContext) + { + final ITabItem tab = + DefaultTabItem.create(title, matchingEntitiesPanel.asDisposableComponent(), + viewContext); + // this tab cannot be opened for the second time, so we can create it outside of the + // factory + return new AbstractTabItemFactory() + { + @Override + public ITabItem create() + { + return tab; + } + + @Override + public String getId() + { + return matchingEntitiesPanel.getId(); + } + + @Override + public HelpPageIdentifier getHelpPageIdentifier() + { + return new HelpPageIdentifier(HelpPageDomain.SEARCH, HelpPageAction.ACTION); + } + + @Override + public String getTabTitle() + { + return title; + } + + @Override + public String tryGetLink() + { + return null; + } + }; + } +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchWidget.java index 86afbcec47a7738c91471ee6168d4c4180a4e669..cedd481bf00394b005c2be8061d279562e32e001 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchWidget.java @@ -20,21 +20,18 @@ import com.extjs.gxt.ui.client.widget.LayoutContainer; import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.form.TextField; import com.extjs.gxt.ui.client.widget.layout.TableRowLayout; +import com.google.gwt.user.client.History; import ch.systemsx.cisd.common.shared.basic.utils.StringUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.AbstractTabItemFactory; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DefaultTabItem; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DispatcherHelper; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.ITabItem; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier.HelpPageAction; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier.HelpPageDomain; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.GlobalSearchLocatorResolver; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.ViewLocator; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.EnterKeyListener; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.ButtonWithLoadingMask; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.IDataRefreshCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SearchableEntity; +import ch.systemsx.cisd.openbis.generic.shared.basic.URLMethodWithParameters; /** * A <code>LayoutContainer</code> extension for searching. @@ -96,11 +93,6 @@ public final class SearchWidget extends LayoutContainer layout(); } - private final void enableSearch(final boolean enable) - { - searchButton.setEnabled(enable); - } - private final SearchableEntitySelectionWidget createEntityChooser() { final SearchableEntitySelectionWidget comboBox = @@ -132,11 +124,6 @@ public final class SearchWidget extends LayoutContainer private final void doSearch() { - // Do not trigger another search when already searching. - if (searchButton.isEnabled() == false) - { - return; - } final String queryText = textField.getValue(); if (StringUtils.isBlank(queryText)) { @@ -148,93 +135,27 @@ public final class SearchWidget extends LayoutContainer viewContext.getMessage(Dict.TOO_GENERIC, queryText), null); return; } - enableSearch(false); - final SearchableEntity selectedSearchableEntityOrNull = - entityChooser.getSelectedSearchableEntity(); - final boolean useWildcardSearchMode = - viewContext.getDisplaySettingsManager().isUseWildcardSearchMode(); - final MatchingEntitiesPanel matchingEntitiesGrid = - new MatchingEntitiesPanel(viewContext, selectedSearchableEntityOrNull, queryText, - useWildcardSearchMode); - String title = createTabTitle(queryText); - final AbstractTabItemFactory tabFactory = - createTabFactory(matchingEntitiesGrid, title, viewContext); - - matchingEntitiesGrid.refresh(new IDataRefreshCallback() - { - public void postRefresh(boolean wasSuccessful) - { - enableSearch(true); - if (wasSuccessful == false) - { - return; - } - if (matchingEntitiesGrid.getRowNumber() == 0) - { - Object[] msgParameters = (useWildcardSearchMode == true) ? new String[] - { queryText, "", "off", } : new String[] - { queryText, "not", "on" }; - MessageBox.alert(viewContext.getMessage(Dict.MESSAGEBOX_WARNING), - viewContext.getMessage(Dict.NO_MATCH, msgParameters), null); - return; - } else - { - textField.reset(); - DispatcherHelper.dispatchNaviEvent(tabFactory); - } - } - }); - } - - private String createTabTitle(final String queryText) - { - final String selectedText = - entityChooser.getValue().get(ModelDataPropertyNames.DESCRIPTION); - return viewContext.getMessage(Dict.GLOBAL_SEARCH, selectedText, queryText); - } - - private static AbstractTabItemFactory createTabFactory( - final MatchingEntitiesPanel matchingEntitiesPanel, final String title, - IViewContext<?> viewContext) - { - final ITabItem tab = - DefaultTabItem.create(title, matchingEntitiesPanel.asDisposableComponent(), - viewContext); - // this tab cannot be opened for the second time, so we can create it outside of the - // factory - return new AbstractTabItemFactory() - { - @Override - public ITabItem create() - { - return tab; - } + // reset the text field + textField.setValue(""); - @Override - public String getId() - { - return matchingEntitiesPanel.getId(); - } + SearchableEntity selectedEntity = entityChooser.getSelectedSearchableEntity(); + if (viewContext.isSimpleMode()) + { + // redirect to another URL + String entityDescription = + (selectedEntity != null) ? selectedEntity.getName() : null; + String url = createGlobalSearchLink(entityDescription, queryText); + History.newItem(url); + } else + { - @Override - public HelpPageIdentifier getHelpPageIdentifier() - { - return new HelpPageIdentifier(HelpPageDomain.SEARCH, HelpPageAction.ACTION); - } + AbstractTabItemFactory tabItemFactory = + GlobalSearchTabItemFactory.create(viewContext, selectedEntity, queryText); - @Override - public String getTabTitle() - { - return title; - } + DispatcherHelper.dispatchNaviEvent(tabItemFactory); + } - @Override - public String tryGetLink() - { - return null; - } - }; } private static boolean hasOnlyWildcards(final String queryText) @@ -251,6 +172,20 @@ public final class SearchWidget extends LayoutContainer return onlyWildcard; } + public static String createGlobalSearchLink(String searchableEntity, String queryText) + { + // forward to a new url + URLMethodWithParameters url = new URLMethodWithParameters(""); + url.addParameter(ViewLocator.ACTION_PARAMETER, + GlobalSearchLocatorResolver.GLOBAL_SEARCH_ACTION); + if (searchableEntity != null) + { + url.addParameter(GlobalSearchLocatorResolver.ENTITY_PARAMETER_KEY, searchableEntity); + } + url.addParameter(GlobalSearchLocatorResolver.QUERY_PARAMETER_KEY, queryText); + return url.toStringWithoutDelimiterPrefix(); + } + private final ButtonWithLoadingMask createSearchButton() { final ButtonWithLoadingMask button = @@ -267,6 +202,8 @@ public final class SearchWidget extends LayoutContainer doSearch(); } }; + return button; } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java new file mode 100644 index 0000000000000000000000000000000000000000..77e4ca1624065686b0c28e5cd24972b80b533d42 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java @@ -0,0 +1,59 @@ +package ch.systemsx.cisd.openbis.generic.client.web.client.application.locator; + +import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.GlobalSearchTabItemFactory; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.AbstractTabItemFactory; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DispatcherHelper; +import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SearchableEntity; +import ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException; + +/** + * {@link IViewLocatorResolver} to handle global search. + * + * @author Kaloyan Enimanev + */ +public class GlobalSearchLocatorResolver extends AbstractViewLocatorResolver +{ + private final IViewContext<ICommonClientServiceAsync> viewContext; + + public final static String GLOBAL_SEARCH_ACTION = "GLOBAL_SEARCH"; + + public final static String ENTITY_PARAMETER_KEY = "type"; + + public final static String QUERY_PARAMETER_KEY = "query"; + + + public GlobalSearchLocatorResolver(IViewContext<ICommonClientServiceAsync> viewContext) + { + super(GLOBAL_SEARCH_ACTION); + this.viewContext = viewContext; + } + + + public void resolve(ViewLocator locator) throws UserFailureException + { + final SearchableEntity selectedSearchableEntity = getSearchableEntity(locator); + // TODO KE: 2011-02-16 we should parse queries that can contain spaces + final String queryText = getMandatoryParameter(locator, QUERY_PARAMETER_KEY); + + AbstractTabItemFactory tabItemFactory = + GlobalSearchTabItemFactory.create(viewContext, selectedSearchableEntity, queryText); + + DispatcherHelper.dispatchNaviEvent(tabItemFactory); + } + + + private SearchableEntity getSearchableEntity(ViewLocator locator) + { + SearchableEntity result = null; + String entity = getOptionalParameter(locator, ENTITY_PARAMETER_KEY); + if (entity != null) + { + result = new SearchableEntity(); + result.setName(entity); + return result; + } + return null; + } +} \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java index ddb03b20a741fa12993def680f73e6dde52871a1..34ae431cc829f34ac851bfb749caf6e9c63dfc12 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java @@ -70,24 +70,29 @@ public class CheckBoxGroupWithModel<T> extends CheckBoxGroup for (LabeledItem<T> item : items) { - final CheckBoxWithModel<T> checkBox = new CheckBoxWithModel<T>(item, false); - checkBox.addListener(Events.Change, new Listener<BaseEvent>() + addCheckBox(item); + } + } + + public void addCheckBox(LabeledItem<T> item) + { + final CheckBoxWithModel<T> checkBox = new CheckBoxWithModel<T>(item, false); + checkBox.addListener(Events.Change, new Listener<BaseEvent>() + { + public void handleEvent(BaseEvent be) { - public void handleEvent(BaseEvent be) + T changedItem = checkBox.getItem(); + if (checkBox.getValue()) + { + selected.add(changedItem); + } else { - T changedItem = checkBox.getItem(); - if (checkBox.getValue()) - { - selected.add(changedItem); - } else - { - selected.remove(changedItem); - } - notifyListeners(); + selected.remove(changedItem); } - }); - add(checkBox); - } + notifyListeners(); + } + }); + add(checkBox); } private void notifyListeners() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParameters.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParameters.java index 76c698e265832a51a7ef26c72a700a0a9029dadb..b6aacaa3ea6056641d7892b0c34267209f3e50ee 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParameters.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParameters.java @@ -18,6 +18,8 @@ package ch.systemsx.cisd.openbis.generic.shared.basic; import com.google.gwt.user.client.rpc.IsSerializable; +import ch.systemsx.cisd.common.shared.basic.utils.StringUtils; + /** * Helper class to create URL's with parameters. Characters in path, parameter names and values are * URL encoded except '0'-'9', 'a'-'z', 'A'-'Z', ':', '/', '.', '*', '-', and '_'. Space character @@ -27,9 +29,11 @@ import com.google.gwt.user.client.rpc.IsSerializable; */ public class URLMethodWithParameters implements IsSerializable { + private static final char STARTING_DELIMITER = '?'; + private final StringBuilder builder; - private char delim = '?'; + private char delim = STARTING_DELIMITER; /** * Create an instance with specified method URL without parameters. @@ -87,6 +91,23 @@ public class URLMethodWithParameters implements IsSerializable return builder.toString(); } + public String toStringWithoutDelimiterPrefix() + { + String string = toString(); + + if (StringUtils.isBlank(string)) + { + // do nothing + + } else if (string.charAt(0) == STARTING_DELIMITER) + { + return string.substring(1); + + } + return string; + + } + /** Creates HTML which displays an image linking to the given URL (if it is specified). */ public static String createEmbededImageHtml(String imageURL, String linkURLOrNull, int width, int height) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooser.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooser.java index 7c19486d34029439f1843b5393895e91a295858d..a1b84fed09b7e333bb82a69385f2dc289223bf06 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooser.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooser.java @@ -182,7 +182,7 @@ class ChannelChooser new ChannelChooserPanel(defaultChannelState, channels, basicChannelCodes, true); channelChooser - .setSelectionChangedListener(new ChannelChooserPanel.ChannelSelectionListener() + .addSelectionChangedListener(new ChannelChooserPanel.ChannelSelectionListener() { public void selectionChanged(List<String> newlySelectedChannels) { diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooserPanel.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooserPanel.java index 897fe637457952adb2fe7e34946e45a6e03a9664..9add394f6aa8869c471dc0711fa3ed2d50eb5756 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooserPanel.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ChannelChooserPanel.java @@ -50,11 +50,13 @@ public class ChannelChooserPanel extends LayoutContainer private IDefaultChannelState defaultChannelState; + // TODO KE: 2011-02-16 refactor this to use CheckBoxGroupWithModel private CheckBoxGroup channelsCheckBoxGroup; private SimpleComboBox<String> channelsComboBox; - private ChannelSelectionListener channelSelectionListener; + private List<ChannelSelectionListener> channelSelectionListeners = + new ArrayList<ChannelSelectionListener>(); /** when set to to true will generate a checkbox per channel */ private boolean createCheckBoxes; @@ -83,6 +85,8 @@ public class ChannelChooserPanel extends LayoutContainer setAutoHeight(true); setAutoWidth(true); + // TODO KE:2011-02-16 set layout as Tomek wants it + // setLayout(new HBoxLayout()); channelsComboBox = createChannelsComboBox(); add(channelsComboBox); @@ -108,12 +112,12 @@ public class ChannelChooserPanel extends LayoutContainer } /** - * sets a {@link ChannelSelectionListener} that will be receiving notifications when the + * adds a {@link ChannelSelectionListener} that will be receiving notifications when the * selection changes. */ - public void setSelectionChangedListener(ChannelSelectionListener selectionListener) + public void addSelectionChangedListener(ChannelSelectionListener selectionListener) { - this.channelSelectionListener = selectionListener; + channelSelectionListeners.add(selectionListener); } /** @@ -249,9 +253,14 @@ public class ChannelChooserPanel extends LayoutContainer ensureAtLeastOneCheckboxChecked(); channelsCheckBoxGroup.setVisible(showCheckBoxGroup); - if (channelSelectionListener != null) + notifySelectionListeners(selection); + } + + private void notifySelectionListeners(List<String> selection) + { + for (ChannelSelectionListener listener : channelSelectionListeners) { - channelSelectionListener.selectionChanged(selection); + listener.selectionChanged(selection); } } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/WellSearchGrid.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/WellSearchGrid.java index 999b0f0cf0e78584620a444b54bfcc966559ccbe..25e7114ee2b62894c5e643209f4f770c807665ba 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/WellSearchGrid.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/WellSearchGrid.java @@ -629,7 +629,7 @@ public class WellSearchGrid extends TypedTableGrid<WellContent> widgetWithListener.selectionChanged(channelChooser.getSelectedValues()); ImageDatasetParameters imageParameters = images.getImageParameters(); - channelChooser.setSelectionChangedListener(widgetWithListener); + channelChooser.addSelectionChangedListener(widgetWithListener); channelChooser.initializeCodesForWellSearchGrid(imageParameters.getChannelsCodes()); return widgetWithListener.asWidget();