Browse Source

Merge pull request #1581 in DESIGN/design from ~JAVA.EDGE/design:release/10.0 to release/10.0

* commit '212bcef93f38d2e69d015862f817e29c7517fc11':
  EPORT-27996 bugfix
feature/big-screen
Java.Edge 5 years ago
parent
commit
e797ca5661
  1. 10
      designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

10
designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

@ -91,10 +91,10 @@ public class TableViewList extends UIList {
if (refreshList != null) { if (refreshList != null) {
refreshList.cancel(true); refreshList.cancel(true);
} }
refreshList = new SwingWorker<Void, Void>() { refreshList = new SwingWorker<DefaultListModel, Void>() {
@Override @Override
protected Void doInBackground() throws Exception { protected DefaultListModel doInBackground() throws Exception {
Connection datasource = ConnectionConfig.getInstance().getConnection(databaseName); Connection datasource = ConnectionConfig.getInstance().getConnection(databaseName);
boolean status = false; boolean status = false;
int count = 3; int count = 3;
@ -106,13 +106,13 @@ public class TableViewList extends UIList {
if (!status) { if (!status) {
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"));
} }
TableViewList.this.setModel(processDataInAnotherThread(databaseName, searchFilter, typesFilter)); return processDataInAnotherThread(databaseName, searchFilter, typesFilter);
return null;
} }
@Override
public void done() { public void done() {
try { try {
get(); TableViewList.this.setModel(get());
} catch (Exception e) { } catch (Exception e) {
if (!(e instanceof InterruptedException) && !(e instanceof CancellationException)) { if (!(e instanceof InterruptedException) && !(e instanceof CancellationException)) {
TableViewList.this.setModel(failed); TableViewList.this.setModel(failed);

Loading…
Cancel
Save