Yaniv Bronhaim has posted comments on this change. Change subject: Avoid updating fields when uneccessary ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/36159/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java: Line 80: } Line 81: Line 82: // Define events: Line 83: Line 84: private void hostName_SelectedItemChanged() { > will we even get here if we are in discovered host mode? yes, currently only in line 139 when we first adding the list. if later we'll have button for refresh lists, this bug will popup in this place also Line 85: if (Boolean.FALSE.equals(getIsDiscoveredHosts().getEntity())) { Line 86: VDS vds = (VDS) getExternalHostName().getSelectedItem(); Line 87: if (vds == null) { Line 88: vds = new VDS(); Line 90: updateModelFromVds(vds, null, false, null); Line 91: } Line 92: } Line 93: Line 94: private void discoverHostName_SelectedItemChanged() { > will we even get here if we aren't in discovered hosts mode? same, when adding the list. if list is empty we will get only to hostName_SelectedItemChanged, and the values will be wrong. currently we count on the order on first load. I want to do it only when needed and not on each update. if i had an event only for literally selection change i wouldn't need it Line 95: if (Boolean.TRUE.equals(getIsDiscoveredHosts().getEntity())) { Line 96: ExternalDiscoveredHost dhost = (ExternalDiscoveredHost) getExternalDiscoveredHosts().getSelectedItem(); Line 97: ExternalHostGroup dhg = (ExternalHostGroup) getExternalHostGroups().getSelectedItem(); Line 98: VDS vds = new VDS(); -- To view, visit http://gerrit.ovirt.org/36159 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7de552c03e361b5186c6781eabd6dc4da34f9fb5 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@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