}
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
InstallData data = InstallData.getInstance();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
if ( nextButtonPressed ) {
// Check, if at least one visible module was selected for installation
data.setVisibleModulesChecked(false);
ModuleCtrl.checkVisibleModulesInstall(packageData, data);
if ( data.visibleModulesChecked() ) {
// Check, if at least one application module was selected for installation
// (not necessary, if an older product is updated or additional modules are
// added in maintenance mode).
boolean applicationSelected = false;
if ( data.olderVersionExists() || data.sameVersionExists() ) {
applicationSelected = true;
} else {
data.setApplicationModulesChecked(false);
ModuleCtrl.checkApplicationSelection(packageData, data);
applicationSelected = data.applicationModulesChecked();
}
if ( applicationSelected ) {
// Check, if at least one language module was selected for installation
// (not necessary, if an older product is updated or additional modules are
// added in maintenance mode).
boolean languageSelected = false;
if ( data.olderVersionExists() || data.sameVersionExists() || ( ! data.isMultiLingual())) {
languageSelected = true;
} else {
data.setLanguageModulesChecked(false);
ModuleCtrl.checkLanguageSelection(packageData, data);
languageSelected = data.languageModulesChecked();
}
if ( languageSelected ) {
// Set module settings for hidden modules.
// Then it is possible to calculate the size of the installed product,
// to show a warning and to set the repeatDialog value to true
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseComponentsCtrl: Before setHiddenModuleSettingsInstall");
}
ModuleCtrl.setHiddenModuleSettingsInstall(packageData);
// Dumper.dumpInstallPackages(packageData);
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseComponentsCtrl: After setHiddenModuleSettingsInstall");
}
// Collecting packages to install
Vector installPackages = new Vector();
PackageCollector.collectInstallPackages(packageData, installPackages);
data.setInstallPackages(installPackages);
// Check disc space
if ( Calculator.notEnoughDiscSpace(data) ) {
repeatDialog = true;
System.err.println("Not enough disc space");
}
} else { // no language modules selected for installation
String message = ResourceManager.getString("String_No_Language_Selected_1") + "\n" +
ResourceManager.getString("String_No_Language_Selected_2");
String title = ResourceManager.getString("String_Change_Selection");
Informer.showInfoMessage(message, title);
repeatDialog = true;
}
} else {
String message = ResourceManager.getString("String_No_Application_Selected_1") + "\n" +
ResourceManager.getString("String_No_Application_Selected_2");
String title = ResourceManager.getString("String_Change_Selection");
Informer.showInfoMessage(message, title);
repeatDialog = true;
}
} else { // no modules selected for installation
String message = ResourceManager.getString("String_No_Components_Selected_1") + "\n" +
ResourceManager.getString("String_No_Components_Selected_2");
String title = ResourceManager.getString("String_Nothing_To_Install");
Informer.showInfoMessage(message, title);
repeatDialog = true;
}
} else { // the back button was pressed
// Saving typical selection state values (always if back button is pressed!).
// System.err.println("Saving custom selection states");
ModuleCtrl.saveCustomSelectionStates(packageData);
data.setCustomSelectionStateSaved(true);
}
return repeatDialog;
}