Lior Vernia has posted comments on this change. Change subject: frontend: Select an empty profile does not work ......................................................................
Patch Set 4: (2 comments) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java Line 383: // Save changes. Line 384: nic.setName((String) getName().getEntity()); Line 385: VnicProfileView profile = (VnicProfileView) getProfile().getSelectedItem(); Line 386: nic.setVnicProfileId(profile != null ? profile.getId() : null); Line 387: nic.setNetworkName(profile != null ? profile.getNetworkName() : null); The new method doesn't have to be called in all places where setVnicProfileId() was called. We could just replace those in the frontend. The backend needs both to be able to handle old usage flows via REST. The value is on its way to be deprecated but the API still has to be supported. A new method is indeed a proper solution, in my opinion, to setting both values from the frontend as they should always come together (from the frontend). Line 388: nic.setLinked((Boolean) getLinked().getEntity()); Line 389: if (getNicType().getSelectedItem() == null) Line 390: { Line 391: nic.setType(null); Line 383: // Save changes. Line 384: nic.setName((String) getName().getEntity()); Line 385: VnicProfileView profile = (VnicProfileView) getProfile().getSelectedItem(); Line 386: nic.setVnicProfileId(profile != null ? profile.getId() : null); Line 387: nic.setNetworkName(profile != null ? profile.getNetworkName() : null); The convention of having business entities not be programmed in an object-oriented manner doesn't sound like a good convention to me. But as you wish. Line 388: nic.setLinked((Boolean) getLinked().getEntity()); Line 389: if (getNicType().getSelectedItem() == null) Line 390: { Line 391: nic.setType(null); -- To view, visit http://gerrit.ovirt.org/18791 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I199d4ce14b55b3f552cf6138b7c3c5d21d620ccc Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> 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