Tomas Jelinek has posted comments on this change.

Change subject: userportal,webadmin: type ahead list box
......................................................................


Patch Set 8: (4 inline comments)

Good point with reordering! I will do that.

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/BaseListModelSuggestBox.java
Line 19: 
Line 20: /**
Line 21:  * Base SuggestBox widget that adapts to UiCommon list model items.
Line 22:  */
Line 23: public abstract class BaseListModelSuggestBox<T> extends Composite 
implements EditorWidget<T, TakesConstrainedValueEditor<T>>, 
HasConstrainedValue<T> {
yeah, good point. I have just generalized the already implemented 
ListModelSuggestBox which was a composite (with all due  
asSuggestBox().doSomething redirections). Let me investigate if there was a 
reason to do it this way or can be simplified.
Line 24: 
Line 25:     private TakesConstrainedValueEditor<T> editor;
Line 26: 
Line 27:     private T value;


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBox.java
Line 110:         suggestBox.getTextBox().addFocusHandler(new FocusHandler() {
Line 111: 
Line 112:             @Override
Line 113:             public void onFocus(FocusEvent event) {
Line 114:                 eventHandler =
I call event.prventDefault() on line 320. This just adds a handler on the top 
of the event stack before the DialogBoxWithKeyHandlers.onPreviewNativeEvent has 
a chance to process it.
Line 115:                         Event.addNativePreviewHandler(new 
EnterIgnoringNativePreviewHandler<T>(ListModelTypeAheadListBox.this));
Line 116:             }
Line 117:         });
Line 118: 


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
Line 103: 
Line 104:         String generalTabExtendedRightWidgetWidth();
Line 105:     }
Line 106: 
Line 107:     interface TypeAheadNameDescriptionTemplate extends 
SafeHtmlTemplates {
In this patch only used in this class. It starts to be used also outside in: 
http://gerrit.ovirt.org/#/c/15011 - and there it is extracted to 
CommonApplicationTemplates.
Line 108:         @Template("<div style='width: 600px'><div style='width: 30%; 
display: inline-block; border-right: 1px solid black; font-weight:bold; 
padding-right: 25px; float: left'>{0}</div><div style='display: inline-block; 
margin-left: 25px;'>{1}</div></div>")
Line 109:         SafeHtml input(String name, String description);
Line 110:     }
Line 111: 


Line 650: 
Line 651:     @SuppressWarnings({ "rawtypes", "unchecked" })
Line 652:     private void initListBoxEditors() {
Line 653:         // General tab
Line 654:         dataCenterEditor = new 
ListModelTypeAheadListBoxEditor<Object>(
Not sure how. This methods don't have logic just extracts the specific 
name/description from objects which don't have common parents. Can you please 
recommend how to generalize it? The best I was able to come with was to create 
the typeAheadNameDescriptionTemplateNullSafe and NullSafeSuggestBoxRenderer.
Line 655:                 new 
ListModelTypeAheadListBoxEditor.NullSafeSuggestBoxRenderer<Object>() {
Line 656: 
Line 657:                     @Override
Line 658:                     public String getReplacementStringNullSafe(Object 
data) {


--
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: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to