Source:
<code>public VnicProfileModel(IModel sourceModel, Version dcCompatibilityVersion, boolean customPropertiesVisible, Guid dcId, Guid defaultQosId) { this.sourceModel = sourceModel; this.customPropertiesVisible = customPropertiesVisible; this.defaultQosId = defaultQosId; setName(new EntityModel<String>()); setNetwork(new ListModel<Network>()); setNetworkQoS(new ListModel<NetworkQoS>()); setPortMirroring(new EntityModel<Boolean>()); setPassthrough(new EntityModel<Boolean>()); setCustomPropertySheet(new KeyValueModel()); EntityModel<Boolean> publicUse = new EntityModel<>(); publicUse.setEntity(true); setPublicUse(publicUse); setDescription(new EntityModel<String>()); getNetwork().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { Network network = getNetwork().getSelectedItem(); boolean portMirroringAllowed = (network == null || !network.isExternal()); if (!portMirroringAllowed) { getPortMirroring().setEntity(false); getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() .getConstants() .portMirroringNotSupportedExternalNetworks()); } getPortMirroring().setIsChangeable(portMirroringAllowed); } }); <START> initPassthroughChangeListener(); <END> initCustomPropertySheet(dcCompatibilityVersion); initNetworkQoSList(dcId); initCommands(); boolean isPassthroughSupported = (Boolean) AsyncDataProvider.getInstance() .getConfigValuePreConverted(ConfigurationValues.NetworkSriovSupported, dcCompatibilityVersion.toString()); getPassthrough().setIsChangeable(isPassthroughSupported); getPassthrough().setChangeProhibitionReason(ConstantsManager.getInstance() .getMessages().passthroughNotSupported(dcCompatibilityVersion.toString())); }</code><technical_language>in case passthrough is supported, is need init this listener</technical_language>

Target:
public VnicProfileModel(IModel sourceModel, Version dcCompatibilityVersion, boolean customPropertiesVisible, Guid dcId, Guid defaultQosId) { this.sourceModel = sourceModel; this.customPropertiesVisible = customPropertiesVisible; this.defaultQosId = defaultQosId; setName(new EntityModel<String>()); setNetwork(new ListModel<Network>()); setNetworkQoS(new ListModel<NetworkQoS>()); setPortMirroring(new EntityModel<Boolean>()); setPassthrough(new EntityModel<Boolean>()); setCustomPropertySheet(new KeyValueModel()); EntityModel<Boolean> publicUse = new EntityModel<>(); publicUse.setEntity(true); setPublicUse(publicUse); setDescription(new EntityModel<String>()); getNetwork().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { Network network = getNetwork().getSelectedItem(); boolean portMirroringAllowed = (network == null || !network.isExternal()); if (!portMirroringAllowed) { getPortMirroring().setEntity(false); getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() .getConstants() .portMirroringNotSupportedExternalNetworks()); } getPortMirroring().setIsChangeable(portMirroringAllowed); } }); boolean isPassthroughSupported = (Boolean) AsyncDataProvider.getInstance() .getConfigValuePreConverted(ConfigurationValues.NetworkSriovSupported, dcCompatibilityVersion.toString()); if (!isPassthroughSupported) { initPassthroughChangeListener(); } initCustomPropertySheet(dcCompatibilityVersion); initNetworkQoSList(dcId); initCommands(); getPassthrough().setIsChangeable(isPassthroughSupported); getPassthrough().setChangeProhibitionReason(ConstantsManager.getInstance() .getMessages().passthroughNotSupported(dcCompatibilityVersion.toString())); }