Browse Source

MOBILE-24787 设计器上第一次打开已有弹窗设置模板,发现弹窗设置界面为空

feature/big-screen
hades 5 years ago
parent
commit
5a59f32b50
  1. 13
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  2. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java

13
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -386,4 +386,17 @@ public class HistoryTemplateListCache implements CallbackEvent {
}
FineLoggerFactory.getLogger().info("Env Change Template Loaded.");
}
/**
* 重新载入当前模板刷新数据/对象
*/
public void reloadCurrentTemplate() {
JTemplate<?, ?> jt = getCurrentEditingTemplate();
boolean access = jt != null && jt.getEditingFILE() != null && jt.getEditingFILE().exists();
if (access) {
closeSelectedReport(jt);
DesignerContext.getDesignerFrame().openTemplate(jt.getEditingFILE());
}
}
}

2
designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java

@ -2,6 +2,7 @@ package com.fr.design.gui.frpane;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane;
@ -45,6 +46,7 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
@Override
public void on(PluginEvent event) {
refreshNameableCreator(createNameableCreators());
HistoryTemplateListCache.getInstance().reloadCurrentTemplate();
}
}, new PluginFilter() {

Loading…
Cancel
Save