Arik Hadas has posted comments on this change. Change subject: frontend: reduce duplicate code related to run-once capability ......................................................................
Patch Set 9: (2 inline comments) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java Line 711: setWindow(model); Line 712: Line 713: model.init(); Line 714: Line 715: // Display protocols. * right, moving 716-731 - done, see http://gerrit.ovirt.org/#/c/13246/ * I don't understand the motivation - that's an implementation of observer pattern, and it looks good to me. why changing? Line 716: EntityModel tempVar = new EntityModel(); Line 717: tempVar.setTitle(ConstantsManager.getInstance().getConstants().VNCTitle()); Line 718: tempVar.setEntity(DisplayType.vnc); Line 719: EntityModel vncProtocol = tempVar; Line 739: tempVar4.setIsCancel(true); Line 740: model.getCommands().add(tempVar4); Line 741: } Line 742: Line 743: private void OnRunOnce() also for the stopProgress method.. I don't understand why is it related to the model - the model is responsible for the run-once code and should notify the source about event such as 'ok', 'cancel' etc - so that the source will be able to do whatever he need (set window to null, stop progress, set availability of actions etc) - it's a good implementation of the observer pattern.. Line 744: { Line 745: UserPortalItemModel selectedItem = (UserPortalItemModel) getSelectedItem(); Line 746: if (selectedItem == null || selectedItem.getEntity() == null) Line 747: { -- To view, visit http://gerrit.ovirt.org/13207 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6561df71f093e2739e689722ead4f85428c04d06 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches