Gilad Chaplik has posted comments on this change.

Change subject: webadmin: adding ListModelRadioGroupEditor
......................................................................


Patch Set 4: Code-Review-1

(5 comments)

partial review.

missing (or I missed it):

* default checked value.
* value for unchecked.
* optional: if you're already here this widget should also support multiple 
selection (checkboxs instead of radiobuttons) - and can be applied pretty 
easily using generics and renaming.

http://gerrit.ovirt.org/#/c/28294/4/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelRadioGroup.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelRadioGroup.java:

Line 37:     }
Line 38: 
Line 39:     @Override
Line 40:     public HandlerRegistration addKeyUpHandler(KeyUpHandler handler) {
Line 41:         return null;
null? you should register to the widget (panel, etc...).
Line 42:     }
Line 43: 
Line 44:     @Override
Line 45:     public HandlerRegistration addKeyDownHandler(KeyDownHandler 
handler) {


http://gerrit.ovirt.org/#/c/28294/4/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/RadioGroup.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/RadioGroup.java:

Line 22: 
Line 23: public class RadioGroup<K> extends Composite implements TakesValue<K>, 
HasConstrainedValue<K> {
Line 24: 
Line 25:     private final Map<K, RadioButton> buttons = new HashMap<K, 
RadioButton>();
Line 26:     private final Map<K, FlowPanel> panels = new HashMap<K, 
FlowPanel>();
FlowPanel should be generic.
Line 27:     FlowPanel wrapperPanel = new FlowPanel();
Line 28:     Renderer<K> renderer;
Line 29:     boolean enabled;
Line 30:     K selectedValue;


Line 23: public class RadioGroup<K> extends Composite implements TakesValue<K>, 
HasConstrainedValue<K> {
Line 24: 
Line 25:     private final Map<K, RadioButton> buttons = new HashMap<K, 
RadioButton>();
Line 26:     private final Map<K, FlowPanel> panels = new HashMap<K, 
FlowPanel>();
Line 27:     FlowPanel wrapperPanel = new FlowPanel();
final
Line 28:     Renderer<K> renderer;
Line 29:     boolean enabled;
Line 30:     K selectedValue;
Line 31:     K oldSelectedValue;


Line 31:     K oldSelectedValue;
Line 32:     String groupString;
Line 33: 
Line 34:     int tabIndex;
Line 35:     char accessKey = 0;
modifiers ^^^


char accessKey = 0; // should char declared with \'? I struggle to understand 
what is '0' here.
Line 36: 
Line 37:     public RadioGroup(Renderer<K> renderer) {
Line 38:         this.renderer = renderer;
Line 39:         initWidget(wrapperPanel);


Line 106:         buttons.clear();
Line 107:         panels.clear();
Line 108:         wrapperPanel.clear();
Line 109: 
Line 110:         for (final K value : values) {
add null check
Line 111:             addValue(value);
Line 112:         }
Line 113: 
Line 114:         updateButtons();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7a2754a1157b1be725871a57a4618404ad4b3223
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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