Source:
public NetworkModel(Network network, ListModel sourceListModel) { this.network = network; this.sourceListModel = sourceListModel; setName(new EntityModel()); setDescription(new EntityModel()); setDataCenters(new ListModel()); getDataCenters().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { syncWithBackend(); } }); setVLanTag(new EntityModel()); EntityModel stpEnabled = new EntityModel(); stpEnabled.setEntity(false); setIsStpEnabled(stpEnabled); EntityModel hasVlanTag = new EntityModel(); hasVlanTag.setEntity(false); setHasVLanTag(hasVlanTag); setMtu(new EntityModel()); EntityModel hasMtu = new EntityModel(); hasMtu.setEntity(false); setHasMtu(hasMtu); EntityModel isVmNetwork = new EntityModel(); isVmNetwork.setEntity(true); setIsVmNetwork(isVmNetwork); EntityModel publicUse = new EntityModel(); publicUse.setEntity(true); setPublicUse(publicUse); setNetworkClusterList(new ListModel()); setOriginalClusters(new ArrayList<VDSGroup>()); setIsEnabled(new EntityModel() { @Override public void setEntity(Object value) { super.setEntity(value); getName().setIsChangable((Boolean) value); getDescription().setIsChangable((Boolean) value); getIsVmNetwork().setIsChangable(isSupportBridgesReportByVDSM() && (Boolean) value); getHasVLanTag().setIsChangable((Boolean) value); getVLanTag().setIsChangable((Boolean) getHasVLanTag().getEntity() && (Boolean) value); getHasMtu().setIsChangable((Boolean) value && isMTUOverrideSupported()); getMtu().setIsChangable((Boolean) getHasMtu().getEntity() && (Boolean) value && isMTUOverrideSupported()); getPublicUse().setIsChangable((Boolean) value); onIsEnableChange(); } }); init(); }

Target:
public NetworkModel(Network network, ListModel sourceListModel) { this.network = network; this.sourceListModel = sourceListModel; setName(new EntityModel()); setDescription(new EntityModel()); setDataCenters(new ListModel()); getDataCenters().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { syncWithBackend(); } }); setVLanTag(new EntityModel()); EntityModel stpEnabled = new EntityModel(); stpEnabled.setEntity(false); setIsStpEnabled(stpEnabled); EntityModel hasVlanTag = new EntityModel(); hasVlanTag.setEntity(false); setHasVLanTag(hasVlanTag); setMtu(new EntityModel()); EntityModel hasMtu = new EntityModel(); hasMtu.setEntity(false); setHasMtu(hasMtu); EntityModel isVmNetwork = new EntityModel(); isVmNetwork.setEntity(true); setIsVmNetwork(isVmNetwork); EntityModel publicUse = new EntityModel(); publicUse.setEntity(true); setPublicUse(publicUse); setNetworkClusterList(new ListModel()); setOriginalClusters(new ArrayList<VDSGroup>()); setIsEnabled(new EntityModel() { @Override public void setEntity(Object value) { super.setEntity(value); getName().setIsChangable((Boolean) value); getDescription().setIsChangable((Boolean) value); getIsVmNetwork().setIsChangable(isSupportBridgesReportByVDSM() && (Boolean) value); getHasVLanTag().setIsChangable((Boolean) value); getVLanTag().setIsChangable((Boolean) getHasVLanTag().getEntity() && (Boolean) value); getHasMtu().setIsChangable((Boolean) value && isMTUOverrideSupported()); getMtu().setIsChangable((Boolean) getHasMtu().getEntity() && (Boolean) value && isMTUOverrideSupported()); onIsEnableChange(); } }); init(); }