Browse Source

REPORT-87768 给子类提供一下重写的能力

release/11.0
Carlson 2 years ago
parent
commit
9e232beb6d
  1. 13
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

13
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -326,6 +326,13 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public abstract JComponent getCurrentReportComponentPane();
/**
* 为另存的模板创建新的模板id
*/
protected void generateNewTemplateIdForSaveAs() {
generateTemplateId();
}
/**
* 收集图表信息
*/
@ -950,9 +957,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
originID = currentId;
}
// 在保存之前,初始化 templateID
if (StringUtils.isEmpty(currentId)) {
generateTemplateId();
}
generateNewTemplateIdForSaveAs();
this.editingFILE = editingFILE;
boolean result = this.saveToNewFile(oldName);
@ -1827,7 +1832,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
originID = currentId;
}
// 在保存之前,初始化 templateID
generateTemplateId();
generateNewTemplateIdForSaveAs();
this.editingFILE = editingFILE;
boolean result = this.saveToNewRealFile(oldName);
if (result) {

Loading…
Cancel
Save