|
|
|
@ -6,6 +6,7 @@ import com.fr.base.TableData;
|
|
|
|
|
import com.fr.data.core.DataCoreUtils; |
|
|
|
|
import com.fr.data.core.db.DBUtils; |
|
|
|
|
import com.fr.data.core.db.dialect.Dialect; |
|
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
|
import com.fr.data.impl.DatabaseDictionary; |
|
|
|
|
import com.fr.data.impl.NameDatabaseConnection; |
|
|
|
|
import com.fr.design.beans.FurtherBasicBeanPane; |
|
|
|
@ -25,6 +26,7 @@ import com.fr.design.event.UIObserverListener;
|
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionRepository; |
|
|
|
|
|
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
@ -176,8 +178,9 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
|
|
|
|
|
if (StringUtils.isBlank(para.getDatabaseName())) { |
|
|
|
|
dbDict.setDatabaseConnection(null); |
|
|
|
|
} else { |
|
|
|
|
database = DBUtils.checkDBConnection(para.getDatabaseName()); |
|
|
|
|
if (database != null) { |
|
|
|
|
Connection connection = ConnectionRepository.getInstance().getByName(para.getDatabaseName()).getConnection(); |
|
|
|
|
if (connection != null) { |
|
|
|
|
database = new NameDatabaseConnection(para.getDatabaseName()); |
|
|
|
|
dbDict.setDatabaseConnection(database); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|