Vojtech Szocs has posted comments on this change.

Change subject: webadmin: Hide custom policy properties section if empty
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

Small suggestion in ClusterPolicyPopupView.java for your consideration, 
otherwise looks OK.

http://gerrit.ovirt.org/#/c/25087/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/scheduling/ClusterPolicyPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/scheduling/ClusterPolicyPopupView.java:

Line 188:         model.getFiltersChangedEvent().addListener(new 
IEventListener() {
Line 189:             @Override
Line 190:             public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 191:                 updateFilters(model);
Line 192:                 
clusterPolicyPropertiesZone.setVisible(showClusterPolicyPropertiesZone(model));
Small suggestion: introduce some method like

 updatePropertiesVisibility(NewClusterPolicyModel model)

that hides the actual implementation of calling FlowPanel.setVisible

Also, in general, handlers/listeners shouldn't be added in View.edit but in 
Presenter(Widget) instead, i.e. inside ClusterPolicyPopupPresenterWidget.init 
override while using ViewDef to tell View implementation what to do (in other 
words, logic like this shouldn't be inside View). This is a more general issue 
though, so it's just for information.
Line 193:             }
Line 194:         });
Line 195:         updateFunctions(model);
Line 196:         model.getFunctionsChangedEvent().addListener(new 
IEventListener() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41cc951ad977f24821d81e909ba958064695903e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@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