Tomas Jelinek has posted comments on this change.
Change subject: userportal,webadmin: type ahead list box
......................................................................
Patch Set 9: (1 inline comment)
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/BaseListModelSuggestBox.java
Line 137: public HandlerRegistration addValueChangeHandler(final
ValueChangeHandler<T> handler) {
Line 138: return asSuggestBox().addValueChangeHandler(new
ValueChangeHandler<String>() {
Line 139: @Override
Line 140: public void onValueChange(ValueChangeEvent<String> event)
{
Line 141: T value = wrap(event.getValue());
The difference is just how you wrap the String to entity and how you render
that entity (even for suggest box the entity is just a String). So this are
abstract and the rest is generic in the parent. I like it more than to
implement two setValue, one getValue and the addValueChangeHandler if it can be
generalized. But no big difference between our approaches - just where to put
the line for "this is generic" and "this is specific".
Line 142: if (value != null) {
Line 143: handler.onValueChange(new
ValueChangeEvent<T>(wrap(event.getValue())) {
Line 144: });
Line 145: }
--
To view, visit http://gerrit.ovirt.org/14936
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I956af3c675894c850a1a104a81cec49f4bd62011
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches