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 8a76522907..b95c03ac6b 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 @@ -230,13 +230,14 @@ public class TableDataTreePane extends BasicTableDataTreePane { protected TemplateTableDataWrapper getTableDataInstance() { TableData tableData = (TableData) creator.createObject(); - //新建的DBTableData单独换为DBTableData + //11中所有数据集都是StrategicTableData的子类 if (tableData instanceof StrategicTableData) { - tableData = new DBTableData(); - StrategicTableData.Binder - .bind((DBTableData) tableData) + StrategicTableData std = (StrategicTableData) tableData; + tableData = StrategicTableData.Binder + .bind(std) .setDsName(createDsName(creator.getPrefix())) - .setScope(StrategicTableData.Scope.TEMPLATE); + .setScope(StrategicTableData.Scope.TEMPLATE) + .done(); } return new TemplateTableDataWrapper(tableData); }