From bf9b529af8e15f6ac76bcf42120e6e63b3db092f Mon Sep 17 00:00:00 2001 From: "Sky.Luo" Date: Thu, 6 Apr 2023 17:05:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-89901=20feat:=20sql=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/wrapper/AbstractTableDataWrapper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java index be993fa686..fc520a4d36 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java @@ -2,11 +2,13 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.TableData; import com.fr.data.TableDataSource; +import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.design.DesignModelAdapter; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.utils.DesignUtils; import com.fr.general.ComparatorUtils; @@ -58,6 +60,9 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { } EmbeddedTableData embeddedTableData = null; + if (tabledata instanceof DBTableData) { + ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); + } try { embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tds, tabledata, TableData.RESULT_NOT_NEED, false); } catch (Exception e) { @@ -103,6 +108,9 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { * */ public void previewData() { + if (tabledata instanceof DBTableData) { + ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); + } PreviewTablePane.previewTableData(tabledata); }