From 5c92f84c8fa9528c7f8caf9285bea30193246f03 Mon Sep 17 00:00:00 2001 From: rinoux Date: Sat, 20 Feb 2021 13:39:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-48124=20=E5=86=85=E7=BD=AE=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=8F=92=E4=BB=B6=E6=BC=8F=E6=8E=89=E4=BA=86=E5=85=B6?= =?UTF-8?q?=E5=AE=83=E6=8F=90=E4=BA=A4&=E6=96=B9=E6=B3=95=E6=94=B9?= =?UTF-8?q?=E4=B8=AA=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/DBTableDataPane.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index a570f1da16..8b1eef0c39 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -238,7 +238,7 @@ public class DBTableDataPane extends AbstractTableDataPane { } - private void refresh() { + private void refreshParameters() { String[] paramTexts = new String[2]; paramTexts[0] = SqlUtils.tryPureSqlText(this.sqlTextPane.getText()); paramTexts[1] = SqlUtils.tryPureSqlText(this.pageQuery); @@ -382,7 +382,7 @@ public class DBTableDataPane extends AbstractTableDataPane { return; } - refresh(); + refreshParameters(); } @@ -487,6 +487,9 @@ public class DBTableDataPane extends AbstractTableDataPane { } + // 保存前 刷新下参数列表 保证获取到最新的参数 + refreshParameters(); + List parameterList = this.editorPane.update(); ParameterProvider[] parameters = parameterList.toArray(new ParameterProvider[0]); @@ -511,7 +514,7 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override public void actionPerformed(ActionEvent e) { - DBTableDataPane.this.refresh(); + DBTableDataPane.this.refreshParameters(); } From 3138498b54aff1b0af7e8dd7812d7b2ad8bad716 Mon Sep 17 00:00:00 2001 From: rinoux Date: Sat, 20 Feb 2021 13:58:36 +0800 Subject: [PATCH 2/2] update --- .../data/tabledata/tabledatapane/DBTableDataPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 8b1eef0c39..16b7e9fa1b 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -36,6 +36,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ToolBarDef; +import com.fr.design.utils.ParameterUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.esd.core.strategy.config.StrategyConfig; import com.fr.esd.core.strategy.config.StrategyConfigHelper; @@ -213,7 +214,7 @@ public class DBTableDataPane extends AbstractTableDataPane { box.setMinimumSize(new Dimension(300, 400)); - this.connectionTableProcedurePane.setMinimumSize(new Dimension(250, 400)); + this.connectionTableProcedurePane.setMinimumSize(new Dimension(230, 400)); this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400)); JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); @@ -243,9 +244,9 @@ public class DBTableDataPane extends AbstractTableDataPane { paramTexts[0] = SqlUtils.tryPureSqlText(this.sqlTextPane.getText()); paramTexts[1] = SqlUtils.tryPureSqlText(this.pageQuery); List existParameterList = this.editorPane.update(); - Parameter[] ps = (existParameterList == null) ? new Parameter[0] : (Parameter[]) existParameterList.toArray(new Parameter[0]); + Parameter[] ps = (existParameterList == null) ? new Parameter[0] : existParameterList.toArray(new Parameter[0]); - this.editorPane.populate(ParameterHelper.analyzeAndUnionSameParameters(paramTexts, ps)); + this.editorPane.populate(ParameterUtils.analyzeAndUnionParameters(paramTexts, ps)); }