diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 96b9cd2cb0..5efb20ff34 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -1022,7 +1022,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { @Override public void actionPerformed(ActionEvent e) { - dgEdit(getTableDataInstance().creatTableDataPane(), createDsName(getNamePrefix()), false); + DesignCacheManager.processByCacheTableData(() -> dgEdit(getTableDataInstance().creatTableDataPane(), createDsName(getNamePrefix()), false)); } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index e1d9263c90..650291ba36 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -188,6 +188,10 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } private boolean isAutoParameterDatabase() { + String name = connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); + if (StringUtils.isEmpty(name)) { + return false; + } Connection connection = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(connectionTableProcedurePane.getSelectedDatabaseConnnectonName())); return connection != null && ArrayUtils.contains(DRIVERS, connection.getDriver()); } diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 652fa23a4f..50c050b013 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -123,7 +123,7 @@ public class TableViewList extends UIList { if (refresh) { clearCache(datasource); } - return processDataInAnotherThread(databaseName, searchFilter, typesFilter); + return processDataInAnotherThread(datasource, searchFilter, typesFilter); } @Override @@ -166,9 +166,8 @@ public class TableViewList extends UIList { * @param searchFilter * @param typesFilter */ - private DefaultListModel processDataInAnotherThread(String databaseName, String searchFilter, String... typesFilter) throws Exception { + private DefaultListModel processDataInAnotherThread(Connection datasource, String searchFilter, String... typesFilter) throws Exception { DefaultListModel defaultListModel = new DefaultListModel(); - Connection datasource = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(databaseName)); if (datasource == null) { return defaultListModel; } @@ -177,7 +176,7 @@ public class TableViewList extends UIList { searchFilter = searchFilter.toLowerCase(); boolean isOracleSystemSpace = DesignerEnvManager.getEnvManager().isOracleSystemSpace(); // oracle不勾选显示所有表,则只显示用户下的(包括存储过程和table表) - DataBaseDetail detail = DataOperator.getInstance().getDataBaseDetail(databaseName, isOracleSystemSpace); + DataBaseDetail detail = DataOperator.getInstance().getDataBaseDetail(datasource.getConnectionName(), isOracleSystemSpace); if (ArrayUtils.isNotEmpty(detail.getSchemas())) { schemas = detail.getSchemas(); }