Tomas Jelinek has posted comments on this change. Change subject: core, webadmin: remove name from template version ......................................................................
Patch Set 4: (1 comment) http://gerrit.ovirt.org/#/c/26270/4/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmMakeTemplatePopupWidget.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmMakeTemplatePopupWidget.java: Line 243: model.getIsSubTemplate().getEntityChangedEvent().addListener(new IEventListener() { Line 244: @Override Line 245: public void eventRaised(Event ev, Object sender, EventArgs args) { Line 246: subTemplateExpanderContent.setVisible(model.getIsSubTemplate().getEntity()); Line 247: nameEditor.setEnabled(!model.getIsSubTemplate().getEntity()); This whole logic is not supposed to be in the widget (expect the one which has been here already: subTemplateExpanderContent.setVisible(model.getIsSubTemplate().getEntity()); because this is a widget, it should only define the view and it's binding to the model. It is not supposed to manipulate the model, even less doing some real logic. Since the rest is a logic, it should be on the model (or better the specific model behavior). In this case NewTemplateVmModelBehavior Line 248: if (!model.getIsSubTemplate().getEntity()) { Line 249: model.getName().setEntity(""); Line 250: } else { Line 251: // by default select the template of the vm -- To view, visit http://gerrit.ovirt.org/26270 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27f26e7d196d1d2eebfe86e8aac886f3e6a8fc5e Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Tomas Jelinek <[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
