aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/ComboBox.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/ComboBox.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/ComboBox.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java
index bb87aed0bb..e6b7b2be94 100644
--- a/server/src/main/java/com/vaadin/ui/ComboBox.java
+++ b/server/src/main/java/com/vaadin/ui/ComboBox.java
@@ -29,6 +29,7 @@ import com.vaadin.data.util.filter.SimpleStringFilter;
import com.vaadin.event.FieldEvents;
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
+import com.vaadin.event.FieldEvents.FocusAndBlurServerRpcImpl;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.server.PaintException;
@@ -90,6 +91,13 @@ public class ComboBox extends AbstractSelect implements
}
};
+ FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(this) {
+ @Override
+ protected void fireEvent(Component.Event event) {
+ ComboBox.this.fireEvent(event);
+ }
+ };
+
/**
* Holds value of property pageLength. 0 disables paging.
*/
@@ -170,6 +178,7 @@ public class ComboBox extends AbstractSelect implements
*/
private void init() {
registerRpc(rpc);
+ registerRpc(focusBlurRpc);
setNewItemsAllowed(false);
setImmediate(true);
@@ -759,14 +768,6 @@ public class ComboBox extends AbstractSelect implements
}
requestRepaint();
}
-
- if (variables.containsKey(FocusEvent.EVENT_ID)) {
- fireEvent(new FocusEvent(this));
- }
- if (variables.containsKey(BlurEvent.EVENT_ID)) {
- fireEvent(new BlurEvent(this));
- }
-
}
@Override