Browse Source

Merge pull request #1714 in BA/design from ~RICHIE/design:feature/10.0 to feature/10.0

* commit 'f66d4a4b9aaa55f89a384dc26ae5a5fce1e5dbf5':
  CORE-46 进一步修改庞大的ConfigManager后遗症
master
superman 7 years ago
parent
commit
1d9ff89bbb
  1. 15
      designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java
  2. 4
      designer/src/com/fr/design/webattr/WebSettingPane.java

15
designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java

@ -1,7 +1,5 @@
package com.fr.design.mainframe;
import com.fr.base.ConfigManager;
import com.fr.base.ConfigManagerProvider;
import com.fr.base.FRContext;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.beans.BasicBeanPane;
@ -28,7 +26,11 @@ import com.fr.web.attr.ReportWebAttr;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.List;
/**
@ -216,8 +218,8 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
TemplateWorkBook wbTpl = editingWorkBook.getTarget();
ReportWebAttr rw = wbTpl.getReportWebAttr();
ConfigManagerProvider cm = ConfigManager.getProviderInstance();
ReportWebAttr webAttr = ((ReportWebAttr) cm.getGlobalAttribute(ReportWebAttr.class));
ReportWebAttr webAttr = ReportWebAttr.getInstance();
//wbTpl.clear先清空
//再将所有的保存进去
@ -318,8 +320,7 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
private void populateServerSettings() {
ConfigManagerProvider cm = ConfigManager.getProviderInstance();
ReportWebAttr webAttr = ((ReportWebAttr) cm.getGlobalAttribute(ReportWebAttr.class));
ReportWebAttr webAttr = ReportWebAttr.getInstance();
if (this.getWebContent(webAttr) != null) {
populate(this.getWebContent(webAttr).getToolBarManagers());
}

4
designer/src/com/fr/design/webattr/WebSettingPane.java

@ -13,7 +13,6 @@ import com.fr.form.event.Listener;
import com.fr.general.Inter;
import com.fr.report.web.ToolBarManager;
import com.fr.report.web.WebContent;
import com.fr.base.ConfigManagerProvider;
import com.fr.stable.StringUtils;
import com.fr.web.attr.ReportWebAttr;
@ -191,8 +190,7 @@ public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane
}
private void populateServerSettings() {
ConfigManagerProvider configManager = ConfigManager.getProviderInstance();
ReportWebAttr reportWebAttr = ((ReportWebAttr)configManager.getGlobalAttribute(ReportWebAttr.class));
ReportWebAttr reportWebAttr = ReportWebAttr.getInstance();
T webContent = this.getWebContent(reportWebAttr);
if(webContent == null){
return;

Loading…
Cancel
Save