}
/** Applies the changes and returns next dialog (BlockDev). */
@Override
public WizardDialog nextDialog() {
final ResourceInfo dri = getDrbdVolumeInfo().getDrbdResourceInfo();
if (proxyHostNextDialog) {
proxyHostNextDialog = false;
final Host proxyHost = hostFactory.createInstance();
proxyHost.setCluster(dri.getCluster());
final NewProxyHostDialog newProxyHostDialog = newProxyHostDialogProvider.get();
newProxyHostDialog.init(this, proxyHost, getDrbdVolumeInfo(), this, new DrbdInstallation());
return newProxyHostDialog;
}
final GlobalInfo globalInfo = dri.getBrowser().getGlobalInfo();
final boolean protocolInNetSection = globalInfo.atLeastVersion("8.4");
if (globalInfo.getDrbdResources().size() <= 1) {
for (final String commonP : COMMON_PARAMS) {
if (!protocolInNetSection && DrbdXml.PROTOCOL_PARAM.equals(commonP)) {
continue;
}
final Widget wi = globalInfo.getWidget(commonP, null);
if (wi == null) {
LOG.appError("widget for param: " + commonP + " was not created");
return null;
}
final Value value = dri.getComboBoxValue(commonP);
globalInfo.getResource().setValue(commonP, value);
wi.setValue(value);
}
}
volumeDialog.init(this, getDrbdVolumeInfo());