|
|
|
@ -40,6 +40,7 @@ import com.fr.stable.ParameterProvider;
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.stable.xml.XMLPrintWriter; |
|
|
|
|
import com.fr.workspace.server.entity.tabledata.PreviewDataBean; |
|
|
|
|
import com.fr.workspace.server.entity.tabledata.PreviewSourceBean; |
|
|
|
|
import com.fr.workspace.server.repository.tabledata.TableDataRepository; |
|
|
|
|
|
|
|
|
|
import javax.swing.JFrame; |
|
|
|
@ -572,10 +573,10 @@ public abstract class DesignTableDataManager {
|
|
|
|
|
parameter.setValue(parameterMap.get(parameter.getName())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
PreviewDataBean bean = new PreviewDataBean(); |
|
|
|
|
PreviewSourceBean bean = new PreviewSourceBean(); |
|
|
|
|
TableDataSource source = TableDataSourceTailor.extractTableData(tableDataSource); |
|
|
|
|
bean.setDataSource(source); |
|
|
|
|
bean.setDataName(getTableDataName(source, tabledata)); |
|
|
|
|
bean.setDataName(DataOperator.getTableDataName(source, tabledata)); |
|
|
|
|
bean.setParameterMap(parameterMap); |
|
|
|
|
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(bean).getTableData(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
@ -700,16 +701,5 @@ public abstract class DesignTableDataManager {
|
|
|
|
|
return globalDsCache.containsKey(tableDataName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static String getTableDataName(TableDataSource source, TableData data) { |
|
|
|
|
Iterator tableDataNameIterator = source.getTableDataNameIterator(); |
|
|
|
|
while (tableDataNameIterator.hasNext()) { |
|
|
|
|
String tableDataName = (String) tableDataNameIterator.next(); |
|
|
|
|
TableData tableData = source.getTableData(tableDataName); |
|
|
|
|
if (tableData.equals(data)) { |
|
|
|
|
return tableDataName; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|