aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2009-10-07 12:13:40 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2009-10-07 12:13:40 +0000
commit7c36939ff0572051f0b073e040eff78677948e40 (patch)
tree8f42f02e9a9f39c8d310094d9e7a44a7978d39d1 /src
parent4a4630570a6810c4661c3b4ce291e1ad2d31bc85 (diff)
downloadvaadin-framework-7c36939ff0572051f0b073e040eff78677948e40.tar.gz
vaadin-framework-7c36939ff0572051f0b073e040eff78677948e40.zip
Fixes #3487: ReadOnlyExceptions for read-only ComboBox
* a read-only ComboBox sent a change event after focus->blur events. svn changeset:9128/svn branch:6.2
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
index 9d1482952c..c349497aa3 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
@@ -1037,7 +1037,7 @@ public class VFilterSelect extends Composite implements Paintable, Field,
public void onFocus(FocusEvent event) {
focused = true;
- if (prompting) {
+ if (prompting && !readonly) {
setPromptingOff("");
}
addStyleDependentName("focus");
@@ -1045,24 +1045,26 @@ public class VFilterSelect extends Composite implements Paintable, Field,
public void onBlur(BlurEvent event) {
focused = false;
- // much of the TAB handling takes place here
- if (tabPressed) {
- tabPressed = false;
- suggestionPopup.menu.doSelectedItemAction();
- suggestionPopup.hide();
- } else if (!suggestionPopup.isAttached()
- || suggestionPopup.isJustClosed()) {
- suggestionPopup.menu.doSelectedItemAction();
- }
- if (selectedOptionKey == null) {
- setPromptingOn();
+ if (!readonly) {
+ // much of the TAB handling takes place here
+ if (tabPressed) {
+ tabPressed = false;
+ suggestionPopup.menu.doSelectedItemAction();
+ suggestionPopup.hide();
+ } else if (!suggestionPopup.isAttached()
+ || suggestionPopup.isJustClosed()) {
+ suggestionPopup.menu.doSelectedItemAction();
+ }
+ if (selectedOptionKey == null) {
+ setPromptingOn();
+ }
}
removeStyleDependentName("focus");
}
public void focus() {
focused = true;
- if (prompting) {
+ if (prompting && !readonly) {
setPromptingOff("");
}
tb.setFocus(true);