diff options
author | Henri Sara <hesara@vaadin.com> | 2016-09-13 13:29:00 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2016-09-14 14:12:28 +0300 |
commit | 4aac5294bba6eff216cddaa826b7739494376ff7 (patch) | |
tree | b72849b9c6085a0fe914031ff22ea7f368269d8f /shared | |
parent | 17f6c77a03130c715843ec2324eb03ffc104e079 (diff) | |
download | vaadin-framework-4aac5294bba6eff216cddaa826b7739494376ff7.tar.gz vaadin-framework-4aac5294bba6eff216cddaa826b7739494376ff7.zip |
Use state for ComboBox selection
Change-Id: I612376b4030a750c987ba2d8016a4dc44bc02d41
Diffstat (limited to 'shared')
3 files changed, 6 insertions, 44 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxClientRpc.java deleted file mode 100644 index 1e8273c05e..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxClientRpc.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * 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 com.vaadin.shared.ui.combobox; - -import com.vaadin.shared.communication.ClientRpc; - -/** - * Server to client RPC interface for ComboBox. - * - * @since - */ -public interface ComboBoxClientRpc extends ClientRpc { - /** - * Set the current selection. - * - * @param selectedKey - * the id of a single item or null to deselect the current value - * @param selectedCaption - * the caption of the selected item (used in case selection is - * outside the lazy loaded range) - */ - public void setSelectedItem(String selectedKey, String selectedCaption); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxServerRpc.java index 9d6ba6d8a4..16b33b2cd4 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxServerRpc.java +++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxServerRpc.java @@ -33,14 +33,6 @@ public interface ComboBoxServerRpc extends ServerRpc { public void createNewItem(String itemValue); /** - * Set the current selection. - * - * @param item - * the id of a single item or null to deselect the current value - */ - public void setSelectedItem(String item); - - /** * Sets the filter to use. * * @param filter diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java index e68d606e67..feb77722b7 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java @@ -82,4 +82,10 @@ public class ComboBoxState extends AbstractSingleSelectState { */ public boolean scrollToSelectedItem = false; + /** + * The caption of the currently selected item or {@code null} if no item is + * selected. + */ + public String selectedItemCaption; + } |