use of org.ovirt.engine.ui.uicompat.IEventListener in project ovirt-engine by oVirt.
the class HostNetworkProviderWidget method edit.
@Override
public void edit(HostNetworkProviderModel model) {
driver.edit(model);
final NeutronAgentModel neutronAgentModel = model.getNeutronAgentModel();
neutronAgentWidget.edit(neutronAgentModel);
neutronAgentWidget.setVisible(neutronAgentModel.isPluginConfigurationAvailable().getEntity());
IEventListener<EventArgs> providerPluginTypeListener = (ev, sender, args) -> neutronAgentWidget.setVisible(model.getNetworkProviderType().getSelectedItem() == OPENSTACK_NETWORK && model.providerPluginTypeIsOpenstack());
model.getNetworkProviderType().getSelectedItemChangedEvent().addListener(providerPluginTypeListener);
model.getProviderPluginType().getSelectedItemChangedEvent().addListener(providerPluginTypeListener);
}
use of org.ovirt.engine.ui.uicompat.IEventListener in project ovirt-engine by oVirt.
the class RegisterVmModel method postClustersInit.
private void postClustersInit() {
validateAllMacs();
for (final RegisterVmData registerVmData : getEntities().getItems()) {
final IEventListener<EventArgs> validateMacsListener = (ev, sender, args) -> validateVmMacs(Collections.singletonList(registerVmData));
registerVmData.getReassignMacs().getEntityChangedEvent().addListener(validateMacsListener);
registerVmData.getCluster().getSelectedItemChangedEvent().addListener(validateMacsListener);
}
}
Aggregations