Vojtech Szocs has posted comments on this change.

Change subject: webadmin: fix duplicate events search results on Enter
......................................................................


Patch Set 1: Code-Review+1

(2 comments)

....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/SearchPanelPresenterWidget.java
Line 127:             }
Line 128:         }));
Line 129: 
Line 130: 
Line 131:         // Workaround GWT bug 3533. SuggestBox mistakenly fires 
key-downs twice. The workaround is
Please add TODO here, issue 
http://code.google.com/p/google-web-toolkit/issues/detail?id=3533 should be 
fixed in GWT 2.6 (soon)
Line 132:         // to set the handler on the SuggestBox's internal TextBox.
Line 133:         SuggestBox searchSuggestBox = (SuggestBox) 
getView().getSearchInputHandlers();
Line 134: 
Line 135:         
registerHandler(searchSuggestBox.getValueBox().addKeyDownHandler(new 
KeyDownHandler() {


Line 129: 
Line 130: 
Line 131:         // Workaround GWT bug 3533. SuggestBox mistakenly fires 
key-downs twice. The workaround is
Line 132:         // to set the handler on the SuggestBox's internal TextBox.
Line 133:         SuggestBox searchSuggestBox = (SuggestBox) 
getView().getSearchInputHandlers();
Minor thing: Presenter(Widget)s shouldn't have any dependencies on specific GWT 
widget classes in order not to compromise Presenter(Widget) testability.. I 
know, we don't have any such tests (for now) but please consider following:
* modify SearchPanelView.getSearchInputHandlers() implementation to return 
"searchStringInput.getValueBox()" and possibly include TODO comment on the issue
* this way, no changes are necessary in SearchPanelPresenterWidget class
Line 134: 
Line 135:         
registerHandler(searchSuggestBox.getValueBox().addKeyDownHandler(new 
KeyDownHandler() {
Line 136:             @Override
Line 137:             public void onKeyDown(KeyDownEvent event) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fa8a023bdecf3d7a23eb10c940e069e2448d2fa
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to