setControl(composite);
init();
-
- if(mode == CdmDataSourceWizard.Mode.CLONE) {
- getDataSource().setName("");
- getDataSource().setDatabase("");
- text_dataSourceName.setText("");
- text_databaseName.setText("");
- }
+
+
}
/**
// add listeners after setting text to avoid the modify event being called
// for the initial value
addListeners();
+
+ // in the case of cloning we use the same datasource info
+ // except for the name
+ if(mode == CdmDataSourceWizard.Mode.CLONE) {
+ getDataSource().setName("");
+ text_dataSourceName.setText("");
+ }
+
}
private void addListeners() {
*/
/** {@inheritDoc} */
public void modifyText(ModifyEvent e) {
- //this.setPageComplete(false);
+
name = text_dataSourceName.getText();
database = text_databaseName.getText();
name = "";
setErrorMessage("DataSource name must not be empty.");
this.setPageComplete(false);
+ return;
} else if (CdmDataSourceRepository.getDataSource(name) != null) {
name = "";
setErrorMessage("DataSource with the same name already exists");