Alexander Wels has posted comments on this change.

Change subject: webadmin : CheckBoxGroup and DaysOfMonthSelector Widgets
......................................................................


Patch Set 14:

(2 comments)

https://gerrit.ovirt.org/#/c/37302/14/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/DaysOfMonthSelector.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/DaysOfMonthSelector.java:

Line 98: 
Line 99:     @Override
Line 100:     public void setValue(String value, boolean fireEvents) {
Line 101:         clearSelections();
Line 102:         for (String valueInProcess : Arrays.asList(value.split(","))) 
{//$NON-NLS-1$
How about this:

  clearSelections();
  if (value != null && !value.isEmpty()) {
    for (String valueInProcess: Arrays.asList(value.split(","))) { //$NON-NLS-1$
      int selectedIndex = getIndexFromDate(valueInProcess);
      if (clickedList.get(selectedIndex) != null) {
        clickedList.set(selectedIndex, true);
        onSelectedItemsChange(selectedIndex + 1, true);
      }
    }
    if (fireEvents) {
      ValueChangeEvent.fire(this, value);
    }
  }
Line 103:             int selectedIndex = getIndexFromDate(valueInProcess);
Line 104:             if (clickedList.get(selectedIndex) != null) {
Line 105:                 clickedList.set(selectedIndex, true);
Line 106:                 onSelectedItemsChange(selectedIndex + 1, true);


Line 111:         }
Line 112:     }
Line 113: 
Line 114:     @Override
Line 115:     public void setValue(String value) {
Why not in combination with above do this:

  setValue(value, false);
Line 116:         if (value == null) {
Line 117:             clearSelections();
Line 118:         }
Line 119:         if (value.isEmpty()) {


-- 
To view, visit https://gerrit.ovirt.org/37302
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I38daa0d2c151eb0e34603488496a8a1ea4719c87
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to