Browse Source
* commit '9addd2290875d54e2415f1a2537dcf441bceb028': REPORT-57496 FR11一轮回归-远程设计-预览数据集报错 REPORT-57202 添加原先“纵向显示长度为9位”的限制 REPORT-57202 FR11一轮回归-页面设置纸张大小问题 REPORT-56855 优化方法命名 REPORT-56855 将原来获取修改数据集后的名字的方法改成私有的 REPORT-56855 树数据集修改名称后-数据字典内的树数据集名称不会改变 REPORT-55468 改下布局,对齐边界 REPORT-57643 调整combobox的大小(feature没有合并到realease,手动合并一波) REPORT-57647 cpt参数面板中组件被下方覆盖时 工具需要不可见 REPORT-57609 & REPORT-57622 导出-导出事件-模板web属性设置&服务器配置设置事件-默认设置不对 REPORT-57624 导出-导出事件-模板web属性设置导出事件-保存后再打开变为邮件事件 REPORT-57431 导出-导出事件-模板选择-文本框需要不可编辑research/11.0
superman
3 years ago
13 changed files with 110 additions and 78 deletions
@ -1,47 +0,0 @@
|
||||
package com.fr.design.data.tabledata.tabledatapane.db; |
||||
|
||||
import com.fr.data.impl.DBTableData; |
||||
import com.fr.esd.event.DSMapping; |
||||
import com.fr.esd.event.DsNameTarget; |
||||
import com.fr.esd.event.StrategyEventsNotifier; |
||||
import com.fr.esd.event.xml.XMLSavedHook; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class DBTableDataSavedHook implements XMLSavedHook<DBTableData> { |
||||
|
||||
private static final long serialVersionUID = 4925391747683335372L; |
||||
|
||||
private final String tplPath; |
||||
private String origName; |
||||
|
||||
private String origConnection; |
||||
|
||||
private String origQuery; |
||||
|
||||
public DBTableDataSavedHook(String tplPath, DBTableData origDBTableData) { |
||||
this.tplPath = tplPath; |
||||
this.origName = origDBTableData.getDsName(); |
||||
this.origConnection = origDBTableData.getDatabase().toString(); |
||||
this.origQuery = origDBTableData.getQuery(); |
||||
} |
||||
|
||||
@Override |
||||
public void doAfterSaved(DBTableData saved) { |
||||
String dsName = saved.getDsName(); |
||||
String conn = saved.getDatabase().toString(); |
||||
String query = saved.getQuery(); |
||||
|
||||
|
||||
//检查数据集名称、数据链接和sql是否修改,如果修改需要触发缓存监听事件
|
||||
if (!dsName.equals(origName) || !conn.equals(origConnection) || !query.equals(origQuery)) { |
||||
if (StringUtils.isNotEmpty(tplPath) && StringUtils.isNotEmpty(origName)) { |
||||
//新建数据集的origName为null,不用触发
|
||||
StrategyEventsNotifier.modifyDataSet(new DSMapping(tplPath, new DsNameTarget(origName))); |
||||
} |
||||
} |
||||
|
||||
this.origName = dsName; |
||||
this.origConnection = conn; |
||||
this.origQuery = query; |
||||
} |
||||
} |
Loading…
Reference in new issue