Tomas Jelinek has uploaded a new change for review.

Change subject: frontend: mouse selection of ListModelTypeAheadListBox
......................................................................

frontend: mouse selection of ListModelTypeAheadListBox

If you are not using the ui binder and select the value
on the ListModelTypeAheadListBox using mouse, the
ListModelTypeAheadListBox.asEditor().getSubEditor().getValue();
does not return the selected value.

The problem was that the mouse selection fired the ValueChangeEvent
but no one was listening on it.

It worked with the editor driver because UiCommonEditorVisitor
listens to this event.

Fixed by listening to this event also in the ListModelTypeAheadListBox.

Change-Id: I5edee9d0b0e64dc4f7e8609aa5fde4c69e133924
Signed-off-by: Tomas Jelinek <tjeli...@redhat.com>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/17818/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
index 8c78595..5d041a0 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
@@ -124,6 +124,14 @@
             }
         });
 
+        addValueChangeHandler(new ValueChangeHandler<T>() {
+            @Override
+            public void onValueChange(ValueChangeEvent<T> event) {
+                // if the value has been changed using the mouse
+                setValue(event.getValue());
+            }
+        });
+
     }
 
     private void switchSuggestions() {


-- 
To view, visit http://gerrit.ovirt.org/17818
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5edee9d0b0e64dc4f7e8609aa5fde4c69e133924
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to